public final class FromNetASCIIOutputStream
extends java.io.FilterOutputStream
Because of the translation process, a call to flush() will
not flush the last byte written if that byte was a carriage
return. A call to close() , however, will
flush the carriage return.
| 构造器和说明 |
|---|
FromNetASCIIOutputStream(java.io.OutputStream output)
Creates a FromNetASCIIOutputStream instance that wraps an existing
OutputStream.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Closes the stream, writing all pending data.
|
void |
write(byte[] buffer)
Writes a byte array to the stream.
|
void |
write(byte[] buffer,
int offset,
int length)
Writes a number of bytes from a byte array to the stream starting from
a given offset.
|
void |
write(int ch)
Writes a byte to the stream.
|
public FromNetASCIIOutputStream(java.io.OutputStream output)
output - The OutputStream to wrap.public void write(int ch)
throws java.io.IOException
write 在类中 java.io.FilterOutputStreamch - The byte to write.java.io.IOException - If an error occurs while writing to the underlying
stream.public void write(byte[] buffer)
throws java.io.IOException
write 在类中 java.io.FilterOutputStreambuffer - The byte array to write.java.io.IOException - If an error occurs while writing to the underlying
stream.public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
write 在类中 java.io.FilterOutputStreambuffer - The byte array to write.offset - The offset into the array at which to start copying data.length - The number of bytes to write.java.io.IOException - If an error occurs while writing to the underlying
stream.public void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseableclose 在类中 java.io.FilterOutputStreamjava.io.IOException - If an error occurs while closing the stream.