Package com.mckoi.database.jdbc
Class UnicodeToBinaryStream
- java.lang.Object
-
- java.io.InputStream
-
- com.mckoi.database.jdbc.UnicodeToBinaryStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
final class UnicodeToBinaryStream extends java.io.InputStream
An object that wraps around a Reader and translates the unicode stream into a stream of bytes that the database is able to transfer to the database. This object simply converts each char from the Reader into two bytes. See also BinaryToUnicodeReader for the Reader version of this class.
-
-
Constructor Summary
Constructors Constructor Description UnicodeToBinaryStream(java.io.Reader reader)
Constructs the stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
int
read()
Reads the next character from the stream.
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException
Reads the next character from the stream.- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-