Package com.tangosol.util
Class NullImplementation.NullOutputStream
java.lang.Object
java.io.OutputStream
com.tangosol.util.NullImplementation.NullOutputStream
- All Implemented Interfaces:
com.oracle.coherence.common.io.OutputStreaming,OutputStreaming,Closeable,DataOutput,Flushable,AutoCloseable
- Enclosing class:
NullImplementation
public static class NullImplementation.NullOutputStream
extends OutputStream
implements OutputStreaming, DataOutput
An OutputStream that does basically nothing. Note that multiple
instances are required because the API dictates that the close method
must cause further invocations to all other methods to throw an
IOException.
- Author:
- cp 2000.11.01
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this OutputStream and releases any associated system resources.voidflush()Flushes this OutputStream and forces any buffered output bytes to be written.intsize()voidwrite(byte[] b) Writes all the bytes in the arrayab.voidwrite(byte[] b, int off, int len) Writescbbytes starting at offsetoffrom the arrayab.voidwrite(int b) Writes the eight low-order bits of the argumentb.voidwriteBoolean(boolean v) voidwriteByte(int v) voidwriteBytes(String s) voidwriteChar(int v) voidwriteChars(String s) voidwriteDouble(double v) voidwriteFloat(float v) voidwriteInt(int v) voidwriteLong(long v) voidwriteShort(int v) voidMethods inherited from class java.io.OutputStream
nullOutputStream
-
Method Details
-
write
Writes the eight low-order bits of the argumentb. The 24 high-order bits ofbare ignored.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfacecom.oracle.coherence.common.io.OutputStreaming- Specified by:
writein classOutputStream- Parameters:
b- the byte to write (passed as an integer)- Throws:
IOException- if an I/O error occurs
-
write
Writes all the bytes in the arrayab.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfacecom.oracle.coherence.common.io.OutputStreaming- Overrides:
writein classOutputStream- Parameters:
b- the byte array to write- Throws:
IOException- if an I/O error occurs
-
write
Writescbbytes starting at offsetoffrom the arrayab.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfacecom.oracle.coherence.common.io.OutputStreaming- Overrides:
writein classOutputStream- Parameters:
b- the byte array to write fromoff- the offset intoabto start writing fromlen- the number of bytes fromabto write- Throws:
IOException- if an I/O error occurs
-
flush
Flushes this OutputStream and forces any buffered output bytes to be written.- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfacecom.oracle.coherence.common.io.OutputStreaming- Overrides:
flushin classOutputStream- Throws:
IOException- if an I/O error occurs
-
close
Closes this OutputStream and releases any associated system resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacecom.oracle.coherence.common.io.OutputStreaming- Overrides:
closein classOutputStream- Throws:
IOException- if an I/O error occurs
-
size
public int size() -
writeDouble
- Specified by:
writeDoublein interfaceDataOutput- Throws:
IOException
-
writeFloat
- Specified by:
writeFloatin interfaceDataOutput- Throws:
IOException
-
writeByte
- Specified by:
writeBytein interfaceDataOutput- Throws:
IOException
-
writeChar
- Specified by:
writeCharin interfaceDataOutput- Throws:
IOException
-
writeInt
- Specified by:
writeIntin interfaceDataOutput- Throws:
IOException
-
writeShort
- Specified by:
writeShortin interfaceDataOutput- Throws:
IOException
-
writeLong
- Specified by:
writeLongin interfaceDataOutput- Throws:
IOException
-
writeBoolean
- Specified by:
writeBooleanin interfaceDataOutput- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceDataOutput- Throws:
IOException
-
writeChars
- Specified by:
writeCharsin interfaceDataOutput- Throws:
IOException
-
writeUTF
- Specified by:
writeUTFin interfaceDataOutput- Throws:
IOException
-