APIdia Launch Partner
Top Description Fields Constructors Methods
sun.java2d.xr

public final Class GrowableByteArray

extends Object
Class Inheritance
Imports
java.util.*

Growable int array, designed to allow subclasses to emulate the behaviour of value types.
Author
Clemens Eisserer

Field Summary

Modifier and TypeField and Description
pack-priv byte[]
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
public
GrowableByteArray(int cellSize, int initialSize)

Method Summary

Modifier and TypeMethod and Description
public final void
addByte(byte i)

public void
public byte[]
getArray()

Returns: a direct reference to the backing array.

public final int
getByte(int index)

protected final int
getCellIndex(int cellIndex)

private int
public final int
getNextIndex()

Returns the index of the next free cell, and grows the backing arrays if required.

public final int
getSize()

Returns: The number of stored cells.

public byte[]
getSizedArray()

Returns: a copy of the backing array.

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayback to summary
pack-priv byte[] array
cellSizeback to summary
pack-priv int cellSize
sizeback to summary
pack-priv int size

Constructor Detail

GrowableByteArrayback to summary
public GrowableByteArray(int cellSize, int initialSize)

Method Detail

addByteback to summary
public final void addByte(byte i)
clearback to summary
public void clear()
getArrayback to summary
public byte[] getArray()
Returns:byte[]

a direct reference to the backing array.

getByteback to summary
public final int getByte(int index)
getCellIndexback to summary
protected final int getCellIndex(int cellIndex)
getNextCellIndexback to summary
private int getNextCellIndex()
getNextIndexback to summary
public final int getNextIndex()

Returns the index of the next free cell, and grows the backing arrays if required.

getSizeback to summary
public final int getSize()
Returns:int

The number of stored cells.

getSizedArrayback to summary
public byte[] getSizedArray()
Returns:byte[]

a copy of the backing array.

growArrayback to summary
protected void growArray()