Package gov.nih.mipav.model.dicomcomm
Class DICOM_Comms.ByteBuffer
- java.lang.Object
- 
- gov.nih.mipav.model.dicomcomm.DICOM_Comms.ByteBuffer
 
- 
- Enclosing class:
- DICOM_Comms
 
 protected class DICOM_Comms.ByteBuffer extends java.lang.ObjectSimple inner class to facilitate the memory allocation of of a byte buffer used in DICOM_Comms to support I/O.
- 
- 
Field SummaryFields Modifier and Type Field Description intbufferSizeThe total capacity of the buffer.byte[]dataThe byte type data buffer.(package private) static intDEFAULT_SIZEStatic indicating the default size of the byte buffer.intendIndexPointer to the end of data in the buffer.intstartIndexPoints the start of data in the buffer.
 - 
Constructor SummaryConstructors Constructor Description ByteBuffer(int size)Allocates the byte buffer of the given size.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallocateMemory(int size)Method that actually allocates the memory.protected voidfinalize()Prepares this class for destruction.intlength()This method returns the length of valid data in the array.
 
- 
- 
- 
Field Detail- 
DEFAULT_SIZEstatic final int DEFAULT_SIZE Static indicating the default size of the byte buffer.- See Also:
- Constant Field Values
 
 - 
bufferSizepublic int bufferSize The total capacity of the buffer.
 - 
datapublic byte[] data The byte type data buffer.
 - 
endIndexpublic int endIndex Pointer to the end of data in the buffer. Default = -1.
 - 
startIndexpublic int startIndex Points the start of data in the buffer. Default = 0;
 
- 
 - 
Method Detail- 
finalizeprotected void finalize() Prepares this class for destruction.- Overrides:
- finalizein class- java.lang.Object
 
 - 
lengthpublic int length() This method returns the length of valid data in the array. Not the total capacity of the array.- Returns:
- The length of data stored in the array.
 
 - 
allocateMemorypublic void allocateMemory(int size) Method that actually allocates the memory.- Parameters:
- size- size of byte buffer to allocate
 
 
- 
 
-