|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
tribble.io.NullOutputStream
public class NullOutputStream
Null output stream (data sink).
A stream which ignores all output written to it, i.e., it sends all data written to it into the bit bucket. This is similar to the Unix/POSIX /dev/null device or the MS-DOS nul file.
Note that none of the methods throw an IOException.
Copyright ©2005-2008 by David R. Tribble, all rights reserved.
Permission is granted to any person or entity except those designated by
by the United States Department of State as a terrorist, or terrorist
government or agency, to use and distribute this source code provided
that the original copyright notice remains present and unaltered.
NullInputStream| Field Summary | |
|---|---|
static NullOutputStream |
NULL_OUT
A null output stream. |
(package private) static java.lang.String |
REV
Revision information. |
| Constructor Summary | |
|---|---|
NullOutputStream()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
write(byte[] buf)
Write a set of bytes to the bit bucket. |
void |
write(byte[] buf,
int off,
int len)
Write a set of bytes to the bit bucket. |
void |
write(int b)
Write a byte to the bit bucket. |
| Methods inherited from class java.io.OutputStream |
|---|
close, flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final java.lang.String REV
public static final NullOutputStream NULL_OUT
| Constructor Detail |
|---|
public NullOutputStream()
| Method Detail |
|---|
public void write(int b)
Note that this method never throws an IOException.
write in class java.io.OutputStreamb - An output byte. This is ignored.public void write(byte[] buf)
Note that this method never throws an IOException.
write in class java.io.OutputStreambuf - An array of bytes to be written.
The contents of this are ignored.
public void write(byte[] buf,
int off,
int len)
Note that this method never throws an IOException.
write in class java.io.OutputStreambuf - An array from which bytes are to be written.
The contents of this are ignored.off - Index of the first byte in buf to write.len - Number of bytes in buf to write.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||