public class WrappedDataOutputStreamPlus extends UnbufferedDataOutputStreamPlus
WrappedDataOutputStreamPlus
instead of this class, as it will
be more efficient when using Plus methods. This class is only for situations where it cannot be used.
The channel provided by this class is just a wrapper around the output stream.Modifier and Type | Field and Description |
---|---|
protected java.io.OutputStream |
out |
channel
Constructor and Description |
---|
WrappedDataOutputStreamPlus(java.io.OutputStream out) |
WrappedDataOutputStreamPlus(java.io.OutputStream out,
java.nio.channels.WritableByteChannel channel) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
write(byte[] buffer,
int offset,
int count)
Writes
count bytes from the byte array buffer
starting at offset to this RandomAccessFile starting at
the current file pointer.. |
void |
write(int oneByte)
Writes the specified byte
oneByte to this RandomAccessFile
starting at the current file pointer. |
applyToChannel, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF, writeUTF
newDefaultChannel, retrieveTemporaryBuffer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasPosition, position, writeUnsignedVInt, writeVInt
public WrappedDataOutputStreamPlus(java.io.OutputStream out)
public WrappedDataOutputStreamPlus(java.io.OutputStream out, java.nio.channels.WritableByteChannel channel)
public void write(byte[] buffer, int offset, int count) throws java.io.IOException
UnbufferedDataOutputStreamPlus
count
bytes from the byte array buffer
starting at offset
to this RandomAccessFile starting at
the current file pointer..write
in interface java.io.DataOutput
write
in class UnbufferedDataOutputStreamPlus
buffer
- the bytes to be writtenoffset
- offset in buffer to get bytescount
- number of bytes in buffer to writejava.io.IOException
- If an error occurs attempting to write to this
RandomAccessFile.public void write(int oneByte) throws java.io.IOException
UnbufferedDataOutputStreamPlus
oneByte
to this RandomAccessFile
starting at the current file pointer. Only the low order byte of
oneByte
is written.write
in interface java.io.DataOutput
write
in class UnbufferedDataOutputStreamPlus
oneByte
- the byte to be writtenjava.io.IOException
- If an error occurs attempting to write to this
RandomAccessFile.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
Copyright © 2018 The Apache Software Foundation