org.broad.igv.tdf
Class BufferedByteWriter
java.lang.Object
org.broad.igv.tdf.BufferedByteWriter
public class BufferedByteWriter
- extends java.lang.Object
Method Summary |
int |
bytesWritten()
|
byte[] |
getBytes()
|
void |
put(byte[] b)
|
void |
put(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array
starting at offset off to this buffered output stream. |
void |
put(int b)
Writes the specified byte to this buffered output stream. |
void |
putFloat(float f)
|
void |
putInt(int v)
|
void |
putLong(long v)
Writes a long to the underlying output stream as eight
bytes, little endian. |
void |
putNullTerminatedString(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferedByteWriter
public BufferedByteWriter()
BufferedByteWriter
public BufferedByteWriter(int size)
getBytes
public byte[] getBytes()
bytesWritten
public int bytesWritten()
put
public void put(int b)
throws java.io.IOException
- Writes the specified byte to this buffered output stream.
- Parameters:
b
- the byte to be written.
- Throws:
java.io.IOException
- if an I/O error occurs.
put
public void put(byte[] b)
throws java.io.IOException
- Throws:
java.io.IOException
put
public void put(byte[] b,
int off,
int len)
throws java.io.IOException
- Writes
len
bytes from the specified byte array
starting at offset off
to this buffered output stream.
- Parameters:
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.
- Throws:
java.io.IOException
- if an I/O error occurs.
putInt
public void putInt(int v)
throws java.io.IOException
- Throws:
java.io.IOException
putFloat
public void putFloat(float f)
throws java.io.IOException
- Throws:
java.io.IOException
putLong
public void putLong(long v)
throws java.io.IOException
- Writes a
long
to the underlying output stream as eight
bytes, little endian. In no exception is thrown, the counter
written
is incremented by 8
.
- Parameters:
v
- a long
to be written.
- Throws:
java.io.IOException
- if an I/O error occurs.- See Also:
FilterOutputStream.out
putNullTerminatedString
public void putNullTerminatedString(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2007-2011 - Thomas Abeel - All Rights Reserved.