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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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)voidwriteUTF(String s)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
write
public void write(int b) throws IOExceptionWrites 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
public void write(byte[] b) throws IOExceptionWrites 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
public void write(byte[] b, int off, int len) throws IOExceptionWritescbbytes 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
public void flush() throws IOExceptionFlushes 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
public void close() throws IOExceptionCloses 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
public void writeDouble(double v) throws IOException- Specified by:
writeDoublein interfaceDataOutput- Throws:
IOException
-
writeFloat
public void writeFloat(float v) throws IOException- Specified by:
writeFloatin interfaceDataOutput- Throws:
IOException
-
writeByte
public void writeByte(int v) throws IOException- Specified by:
writeBytein interfaceDataOutput- Throws:
IOException
-
writeChar
public void writeChar(int v) throws IOException- Specified by:
writeCharin interfaceDataOutput- Throws:
IOException
-
writeInt
public void writeInt(int v) throws IOException- Specified by:
writeIntin interfaceDataOutput- Throws:
IOException
-
writeShort
public void writeShort(int v) throws IOException- Specified by:
writeShortin interfaceDataOutput- Throws:
IOException
-
writeLong
public void writeLong(long v) throws IOException- Specified by:
writeLongin interfaceDataOutput- Throws:
IOException
-
writeBoolean
public void writeBoolean(boolean v) throws IOException- Specified by:
writeBooleanin interfaceDataOutput- Throws:
IOException
-
writeBytes
public void writeBytes(String s) throws IOException
- Specified by:
writeBytesin interfaceDataOutput- Throws:
IOException
-
writeChars
public void writeChars(String s) throws IOException
- Specified by:
writeCharsin interfaceDataOutput- Throws:
IOException
-
writeUTF
public void writeUTF(String s) throws IOException
- Specified by:
writeUTFin interfaceDataOutput- Throws:
IOException
-
-