public class BufferedDataOutputStreamPlus extends DataOutputStreamPlus
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.ByteBuffer |
buffer |
protected boolean |
strictFlushing |
channel| Modifier | Constructor and Description |
|---|---|
protected |
BufferedDataOutputStreamPlus(java.nio.ByteBuffer buffer) |
|
BufferedDataOutputStreamPlus(java.io.FileOutputStream fos) |
|
BufferedDataOutputStreamPlus(java.io.FileOutputStream fos,
int bufferSize) |
|
BufferedDataOutputStreamPlus(java.io.RandomAccessFile ras) |
|
BufferedDataOutputStreamPlus(java.io.RandomAccessFile ras,
int bufferSize) |
|
BufferedDataOutputStreamPlus(java.nio.channels.WritableByteChannel wbc) |
protected |
BufferedDataOutputStreamPlus(java.nio.channels.WritableByteChannel channel,
java.nio.ByteBuffer buffer) |
|
BufferedDataOutputStreamPlus(java.nio.channels.WritableByteChannel wbc,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
applyToChannel(com.google.common.base.Function<java.nio.channels.WritableByteChannel,R> f)
Safe way to operate against the underlying channel.
|
void |
close() |
protected void |
doFlush(int count) |
void |
flush() |
BufferedDataOutputStreamPlus |
order(java.nio.ByteOrder order) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(java.nio.ByteBuffer toWrite) |
void |
write(int b) |
void |
write(Memory memory,
long offset,
long length) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(java.lang.String s) |
void |
writeChar(int v) |
void |
writeChars(java.lang.String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeUnsignedVInt(long value)
This is more efficient for storing unsigned values, both in storage and CPU burden.
|
void |
writeUTF(java.lang.String s) |
void |
writeVInt(long value) |
newDefaultChannel, retrieveTemporaryBufferclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasPosition, positionprotected java.nio.ByteBuffer buffer
protected boolean strictFlushing
public BufferedDataOutputStreamPlus(java.io.RandomAccessFile ras)
public BufferedDataOutputStreamPlus(java.io.RandomAccessFile ras,
int bufferSize)
public BufferedDataOutputStreamPlus(java.io.FileOutputStream fos)
public BufferedDataOutputStreamPlus(java.io.FileOutputStream fos,
int bufferSize)
public BufferedDataOutputStreamPlus(java.nio.channels.WritableByteChannel wbc)
public BufferedDataOutputStreamPlus(java.nio.channels.WritableByteChannel wbc,
int bufferSize)
protected BufferedDataOutputStreamPlus(java.nio.channels.WritableByteChannel channel,
java.nio.ByteBuffer buffer)
protected BufferedDataOutputStreamPlus(java.nio.ByteBuffer buffer)
public void write(byte[] b)
throws java.io.IOException
write in interface java.io.DataOutputwrite in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface java.io.DataOutputwrite in class java.io.OutputStreamjava.io.IOExceptionpublic void write(java.nio.ByteBuffer toWrite)
throws java.io.IOException
java.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in interface java.io.DataOutputwrite in class java.io.OutputStreamjava.io.IOExceptionpublic void writeBoolean(boolean v)
throws java.io.IOException
java.io.IOExceptionpublic void writeByte(int v)
throws java.io.IOException
java.io.IOExceptionpublic void writeShort(int v)
throws java.io.IOException
java.io.IOExceptionpublic void writeChar(int v)
throws java.io.IOException
java.io.IOExceptionpublic void writeInt(int v)
throws java.io.IOException
java.io.IOExceptionpublic void writeLong(long v)
throws java.io.IOException
java.io.IOExceptionpublic void writeVInt(long value)
throws java.io.IOException
java.io.IOExceptionpublic void writeUnsignedVInt(long value)
throws java.io.IOException
DataOutputPlusjava.io.IOExceptionpublic void writeFloat(float v)
throws java.io.IOException
java.io.IOExceptionpublic void writeDouble(double v)
throws java.io.IOException
java.io.IOExceptionpublic void writeBytes(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void writeChars(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void writeUTF(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void write(Memory memory, long offset, long length) throws java.io.IOException
java.io.IOException@DontInline
protected void doFlush(int count)
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic <R> R applyToChannel(com.google.common.base.Function<java.nio.channels.WritableByteChannel,R> f)
throws java.io.IOException
DataOutputPlusjava.io.IOExceptionpublic BufferedDataOutputStreamPlus order(java.nio.ByteOrder order)
Copyright © 2016 The Apache Software Foundation