Package org.exbin.bined
Class CharsetStreamTranslator
- java.lang.Object
-
- java.io.InputStream
-
- org.exbin.bined.CharsetStreamTranslator
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
@ParametersAreNonnullByDefault public class CharsetStreamTranslator extends java.io.InputStreamInput stream translation class which converts from input charset to target charset.
-
-
Field Summary
Fields Modifier and Type Field Description static intBYTE_BUFFER_SIZE
-
Constructor Summary
Constructors Constructor Description CharsetStreamTranslator(java.nio.charset.Charset inputCharset, java.nio.charset.Charset outputCharset, java.io.InputStream source)CharsetStreamTranslator(java.nio.charset.Charset inputCharset, java.nio.charset.Charset outputCharset, java.io.InputStream source, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidprocessNext()intread()intread(byte[] buffer, int offset, int length)
-
-
-
Field Detail
-
BYTE_BUFFER_SIZE
public static final int BYTE_BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CharsetStreamTranslator
public CharsetStreamTranslator(java.nio.charset.Charset inputCharset, java.nio.charset.Charset outputCharset, java.io.InputStream source, int bufferSize)
-
CharsetStreamTranslator
public CharsetStreamTranslator(java.nio.charset.Charset inputCharset, java.nio.charset.Charset outputCharset, java.io.InputStream source)
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] buffer, int offset, int length) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
processNext
public void processNext()
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException
-
-