org.hibernate.engine.jdbc.ReaderInputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
JPMS Module-Info's for a few of the Jakarta Libraries just until they add them in themselves
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.engine.jdbc;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
/**
* Exposes a {@link Reader} as an {@link InputStream}.
*
* @author Gavin King
*/
public class ReaderInputStream extends InputStream {
private Reader reader;
/**
* Constructs a ReaderInputStream from a Reader
*
* @param reader The reader to expose as an InputStream
*/
public ReaderInputStream(Reader reader) {
this.reader = reader;
}
@Override
public int read() throws IOException {
return reader.read();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy