com.partnersoft.data
Class IntBuffer

java.lang.Object
  extended by com.partnersoft.data.DataBuffer
      extended by com.partnersoft.data.IntBuffer
All Implemented Interfaces:
java.io.Serializable

public class IntBuffer
extends DataBuffer

A fast int array buffer with public access to contents. Intended for fast and unsafe operations.

Author:
Paul Reavis Copyright 2001 Partner Software, Inc.
See Also:
Serialized Form

Field Summary
 int[] array
           
 
Fields inherited from class com.partnersoft.data.DataBuffer
arrayObject, capacity, end, growthCap, growthMin, start
 
Constructor Summary
IntBuffer()
          Creates an empty int buffer.
IntBuffer(int size)
          Creates a int buffer of the given size.
IntBuffer(int[] array)
           
 
Method Summary
 void add(int value)
           
 java.lang.String contentsToString()
           
 void newArray(int size)
          Allocates a new, empty array of the given size and assign it to the arrayObject property.
 ByteBuffer toByteBuffer()
           
 int[] toIntArray()
           
 
Methods inherited from class com.partnersoft.data.DataBuffer
append, clear, clone, copy, copyTo, getSize, insert, isEmpty, makeRoomFor, makeRoomFor, pack, remove, setToMatch, subsection, tidy, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

array

public int[] array
Constructor Detail

IntBuffer

public IntBuffer()
Creates an empty int buffer. buffer is left null!


IntBuffer

public IntBuffer(int size)
Creates a int buffer of the given size.


IntBuffer

public IntBuffer(int[] array)
Method Detail

newArray

public void newArray(int size)
Description copied from class: DataBuffer
Allocates a new, empty array of the given size and assign it to the arrayObject property. It is assumed that subclasses will also set it to a variable of the correct class (e.g. char[]) for ease of access as well. Copying of existing contents is managed by this superclass.

Specified by:
newArray in class DataBuffer

add

public void add(int value)

toIntArray

public final int[] toIntArray()

contentsToString

public java.lang.String contentsToString()

toByteBuffer

public ByteBuffer toByteBuffer()