public class NullOutputStream extends OutputStream
Constructor and Description |
---|
NullOutputStream()
Construct a null output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close an output stream.
|
void |
flush()
Flush an output stream, which does nothing.
|
void |
write(byte[] a,
int offset,
int length)
Write a byte array to the output stream, which is thrown away.
|
void |
write(int b)
Write a byte to the output stream, which is thrown away.
|
write
public void write(int b) throws IOException
write
in class OutputStream
b
- The byte to toss.IOException
- If the stream is closed.public void write(byte[] a, int offset, int length) throws IOException
write
in class OutputStream
a
- The array to write.offset
- Where in the array to ignore bytes to write.length
- How many bytes to ignore.IOException
- If the stream is closed.public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
- If the stream is closed.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- If the stream is already closed.Copyright © 1999–2017 Apache OODT. All rights reserved.