|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream net.sf.hermesftp.streams.TextOutputStream
public class TextOutputStream
Returns text data as byte arrays. In contrast to WriterOutputStream this class supports records. Internally, the a Writer is used to perform the translation from characters to bytes.
Constructor Summary | |
---|---|
TextOutputStream(java.io.OutputStream os,
java.lang.String outputEncoding)
Constructor. |
|
TextOutputStream(java.io.OutputStream os,
java.lang.String outputEncoding,
java.lang.String inputEncoding)
Constructor. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
Flushes any buffered record data. |
void |
write(int b)
|
void |
writeRecord(byte[] data,
boolean eof)
Writes out a whole record. |
Methods inherited from class java.io.OutputStream |
---|
write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextOutputStream(java.io.OutputStream os, java.lang.String outputEncoding) throws java.io.UnsupportedEncodingException
os
- The output stream.outputEncoding
- The encoding of outbound text data.
java.io.UnsupportedEncodingException
- Thrown if encoding is unknown.public TextOutputStream(java.io.OutputStream os, java.lang.String outputEncoding, java.lang.String inputEncoding) throws java.io.UnsupportedEncodingException
os
- The output stream.outputEncoding
- The encoding of outbound text data.inputEncoding
- The encoding of inbound text data.
java.io.UnsupportedEncodingException
- Thrown if encoding is unknown.Method Detail |
---|
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void writeRecord(byte[] data, boolean eof) throws java.io.IOException
writeRecord
in interface RecordWriteSupport
data
- The record data.eof
- True, if last record is passed.
java.io.IOException
- Thrown if writing fails.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in interface RecordWriteSupport
flush
in class java.io.OutputStream
java.io.IOException
- Thrown if IO fails.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |