public class NullWriteStream extends WriteStream
| Constructor and Description |
|---|
NullWriteStream() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite()
Returns true if the buffer allows writes.
|
void |
flush()
Flushes the buffer to the source.
|
void |
write(byte[] buf)
Writes a byte array.
|
void |
write(byte[] buf,
int offset,
int length)
Writes a byte array
|
void |
write(int ch)
Writes a byte.
|
clearPosition, clearWrite, close, flushBuffer, flushToDisk, free, getAttribute, getAttributeNames, getBuffer, getBufferOffset, getBufferSize, getDisableClose, getEncoding, getJavaEncoding, getNewlineString, getPath, getPosition, getPrintWriter, getRemaining, getSource, getUserPath, init, isClosed, isMmapEnabled, isSendfileEnabled, lock, log, log, nextBuffer, print, print, print, print, print, print, print, print, print, print, print, print, printLatin1, printLatin1, printLatin1NoLf, println, println, println, println, println, println, println, println, println, println, printUtf8, pushFilter, removeAttribute, seekEnd, seekStart, setAttribute, setBufferOffset, setDisableClose, setDisableCloseSource, setEncoding, setFlushOnNewline, setImplicitFlush, setLocale, setNewlineString, setPath, setPosition, setReuseBuffer, setSysNewline, setSystemNewline, toString, unlock, writeFile, writeMmap, writeSendfile, writeStream, writeStream, writeStream, writeStream, XprintLatin1NoLfpublic boolean canWrite()
WriteStreamLogStreams, used for debugging, use this feature to
test if they should write with very little overhead.
if (dbg.canWrite())
dbg.log("some debug value " + expensiveDebugCalculation(foo));
canWrite in class WriteStreampublic void write(int ch)
throws java.io.IOException
write in interface ByteAppendablewrite in class WriteStreamjava.io.IOExceptionpublic void write(byte[] buf,
int offset,
int length)
throws java.io.IOException
write in interface ByteAppendablewrite in class WriteStreamjava.io.IOExceptionpublic void write(byte[] buf)
throws java.io.IOException
write in class WriteStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class WriteStreamjava.io.IOException