Class ExposedDataOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
org.jgroups.util.ExposedDataOutputStream
- All Implemented Interfaces:
Closeable, DataOutput, Flushable, AutoCloseable
- Version:
- $Id: ExposedDataOutputStream.java,v 1.2.4.1 2008/10/28 09:32:36 belaban Exp $
- Author:
- Bela Ban
-
Field Summary
Fields inherited from class DataOutputStream
writtenFields inherited from class FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new data output stream to write data to the specified underlying output stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidreset()voidwrite(byte[] b, int off, int len) Writeslenbytes from the specified byte array starting at offsetoffto the underlying output stream.voidwrite(int b) Writes the specified byte (the low eight bits of the argumentb) to the underlying output stream.Methods inherited from class DataOutputStream
flush, size, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFMethods inherited from class FilterOutputStream
close, writeMethods inherited from class OutputStream
nullOutputStreamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataOutput
write
-
Constructor Details
-
ExposedDataOutputStream
Creates a new data output stream to write data to the specified underlying output stream. The counterwrittenis set to zero.- Parameters:
out- the underlying output stream, to be saved for later use.- See Also:
-
-
Method Details
-
reset
public void reset() -
getOutputStream
-
write
Writes the specified byte (the low eight bits of the argumentb) to the underlying output stream. If no exception is thrown, the counterwrittenis incremented by1.Implements the
writemethod ofOutputStream.- Specified by:
writein interfaceDataOutput- Overrides:
writein classDataOutputStream- Parameters:
b- thebyteto be written.- Throws:
IOException- if an I/O error occurs.- See Also:
-
write
Writeslenbytes from the specified byte array starting at offsetoffto the underlying output stream. If no exception is thrown, the counterwrittenis incremented bylen.- Specified by:
writein interfaceDataOutput- Overrides:
writein classDataOutputStream- Parameters:
b- the data.off- the start offset in the data.len- the number of bytes to write.- Throws:
IOException- if an I/O error occurs.- See Also:
-