|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream net.sf.hermesftp.streams.TextInputStream
public class TextInputStream
Reads text data and makes the lines accessible as records. The records are returned as byte arrays. Internally, the a Reader is used to perform the translation from characters to bytes.
Constructor Summary | |
---|---|
TextInputStream(java.io.InputStream is,
java.lang.String inputEncoding)
Constructor. |
|
TextInputStream(java.io.InputStream is,
java.lang.String inputEncoding,
java.lang.String outputEncoding)
Constructor. |
Method Summary | |
---|---|
void |
close()
|
int |
read()
|
byte[] |
readRecord()
Reads a whole record without delimiters. |
Methods inherited from class java.io.InputStream |
---|
available, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextInputStream(java.io.InputStream is, java.lang.String inputEncoding) throws java.io.UnsupportedEncodingException
is
- The input stream.inputEncoding
- The encoding.
java.io.UnsupportedEncodingException
- Thrown if encoding is unknown.public TextInputStream(java.io.InputStream is, java.lang.String inputEncoding, java.lang.String outputEncoding) throws java.io.UnsupportedEncodingException
is
- The input stream.inputEncoding
- The encoding of the inbound text data.outputEncoding
- The encoding of the outbound text data.
java.io.UnsupportedEncodingException
- Thrown if encoding is unknown.Method Detail |
---|
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public byte[] readRecord() throws java.io.IOException
readRecord
in interface RecordReadSupport
java.io.IOException
- Throws if reading fails.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |