de.jreality.scene.data
Class ByteBufferList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by de.jreality.scene.data.DataItem
              extended by de.jreality.scene.data.DataList
                  extended by de.jreality.scene.data.ByteBufferList
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List

public class ByteBufferList
extends DataList
implements java.io.Serializable

This class uses a pool of ByteBuffer when being de-serialized. Clients should copy data and release the buffer afterwards. Be careful: this class is intended to be used as a traffic object for transferring data
Dont use for usual data storage! Only 1- and 2-dimensional int and double arrays are supported!

See Also:
Serialized Form

Nested Class Summary
static class ByteBufferList.BufferPool
           
 
Field Summary
static java.util.LinkedList<ByteBufferList> usedDataLists
           
 
Method Summary
static boolean canCopy(DataList dl)
           
static ByteBufferList createByteBufferCopy(DataList dl)
           
 java.lang.Object createFittingDataObject()
           
static void freeDataList(ByteBufferList wdl)
           
 int getCoveredLength()
           
 StorageModel getCoveredModel()
           
 int getEntryLength()
           
static DataListSet prepareDataListSet(DataListSet attributes)
           
static void releaseDataListSet(DataListSet attributes)
           
static void releaseList(ByteBufferList copy)
           
 void setCoveredLength(int coveredLength)
           
 void setCoveredModel(StorageModel coveredModel)
           
 void setEntryLength(int entryLength)
           
 java.lang.String toString()
           
 
Methods inherited from class de.jreality.scene.data.DataList
get, getStorageModel, item, readOnlyList, size, toDoubleArray, toDoubleArrayArray, toIntArray, toIntArrayArray
 
Methods inherited from class de.jreality.scene.data.DataItem
copyTo, copyTo, printUsage, toDoubleArray, toDoubleArrayArray, toIntArray, toIntArrayArray, toStringArray, toStringArray, toStringArrayArray, toStringArrayArray
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

usedDataLists

public static java.util.LinkedList<ByteBufferList> usedDataLists
Method Detail

getCoveredLength

public int getCoveredLength()

setCoveredLength

public void setCoveredLength(int coveredLength)

getCoveredModel

public StorageModel getCoveredModel()

setCoveredModel

public void setCoveredModel(StorageModel coveredModel)

freeDataList

public static void freeDataList(ByteBufferList wdl)

createByteBufferCopy

public static ByteBufferList createByteBufferCopy(DataList dl)

toString

public java.lang.String toString()
Overrides:
toString in class DataList

getEntryLength

public int getEntryLength()

setEntryLength

public void setEntryLength(int entryLength)

createFittingDataObject

public java.lang.Object createFittingDataObject()

prepareDataListSet

public static DataListSet prepareDataListSet(DataListSet attributes)

releaseDataListSet

public static void releaseDataListSet(DataListSet attributes)

canCopy

public static boolean canCopy(DataList dl)

releaseList

public static void releaseList(ByteBufferList copy)
Parameters:
copy -