com.ibm.tuningfork.tracegen.chunk
Class RawChunk

java.lang.Object
  extended by com.ibm.tuningfork.tracegen.chunk.RawChunk
Direct Known Subclasses:
Chunk, FeedHeaderChunk

public abstract class RawChunk
extends Object


Field Summary
private  int cursor
           
private  byte[] data
           
static int ENCODING_SPACE_DOUBLE
           
static int ENCODING_SPACE_INT
           
static int ENCODING_SPACE_LONG
           
private  boolean open
           
 
Constructor Summary
protected RawChunk(byte[] buffer)
           
protected RawChunk(int capacity)
           
 
Method Summary
protected  boolean addByte(byte b)
           
protected  boolean addDouble(double d)
           
protected  void addDoubleUnchecked(double d)
           
protected  boolean addInt(int i)
           
protected  void addIntUnchecked(int i)
           
protected  boolean addLong(long l)
           
protected  void addLongUnchecked(long l)
           
protected  boolean addString(String str)
           
protected  boolean addStringInternal(char[] backingChars)
           
 void close()
           
protected  int getPosition()
           
protected  boolean hasRoom(int bytes)
           
private  void putInt(int value)
           
protected  void putIntAt(int index, int value)
           
private  void putLong(long value)
           
protected  void resetImpl()
           
protected  void seek(int pos)
           
 void write(OutputStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING_SPACE_INT

public static final int ENCODING_SPACE_INT
See Also:
Constant Field Values

ENCODING_SPACE_LONG

public static final int ENCODING_SPACE_LONG
See Also:
Constant Field Values

ENCODING_SPACE_DOUBLE

public static final int ENCODING_SPACE_DOUBLE
See Also:
Constant Field Values

data

private final byte[] data

cursor

private int cursor

open

private boolean open
Constructor Detail

RawChunk

protected RawChunk(byte[] buffer)

RawChunk

protected RawChunk(int capacity)
Method Detail

close

public void close()

write

public final void write(OutputStream outputStream)
                 throws IOException
Throws:
IOException

resetImpl

protected void resetImpl()

getPosition

protected int getPosition()

seek

protected void seek(int pos)

hasRoom

protected final boolean hasRoom(int bytes)

addLong

protected final boolean addLong(long l)

addLongUnchecked

protected final void addLongUnchecked(long l)

addDouble

protected final boolean addDouble(double d)

addDoubleUnchecked

protected final void addDoubleUnchecked(double d)

addInt

protected final boolean addInt(int i)

addIntUnchecked

protected final void addIntUnchecked(int i)

addByte

protected final boolean addByte(byte b)

addString

protected final boolean addString(String str)

addStringInternal

protected boolean addStringInternal(char[] backingChars)

putLong

private void putLong(long value)

putInt

private void putInt(int value)

putIntAt

protected void putIntAt(int index,
                        int value)