public class DataOutputStreamPlus extends AbstractDataOutput implements DataOutputPlus
DataOutputStreamAndChannel
instead of this class, as it will
be more efficient. This class is only for situations where it cannot be usedModifier and Type | Field and Description |
---|---|
protected java.io.OutputStream |
out |
Constructor and Description |
---|
DataOutputStreamPlus(java.io.OutputStream out) |
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. |
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write, write
public void write(byte[] buffer, int offset, int count) throws java.io.IOException
AbstractDataOutput
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 AbstractDataOutput
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
AbstractDataOutput
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 AbstractDataOutput
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 © 2014 The Apache Software Foundation