Package nom.tam.util
Class BufferPointer
java.lang.Object
nom.tam.util.BufferPointer
Deprecated.
(for internal use) It is a rusty-rail compatibility implementation only, unsafe for general use.
No longer used within the FITS package itself. If you do attempt to use it with the deprecated APIs,
beware that no data will be filled into the buffer of this object ever by the library, although its
length and position fields may be updated to pretend as if the buffer were always hall full / half
available...
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Rusty rail implementation only.BufferPointer
(byte[] buffer) Deprecated.Rusty rail implementation only. -
Method Summary
Modifier and TypeMethodDescriptionprotected BufferPointer
init
(int bufferSize) Deprecated.Rusty rail implementation only.protected void
Deprecated.Invalidates the pointer, setting both the length and the position to zero.int
limit()
Deprecated.Returns the current sizeof the bufferint
position()
Deprecated.Returns the current buffer position
-
Field Details
-
buffer
protected byte[] bufferDeprecated.The data buffer. -
length
protected int lengthDeprecated.The number of valid characters in the buffer -
pos
protected int posDeprecated.The current offset into the buffer
-
-
Constructor Details
-
BufferPointer
public BufferPointer()Deprecated.Rusty rail implementation only.Constructs a new buffer pointer with no associated buffer -
BufferPointer
public BufferPointer(byte[] buffer) Deprecated.Rusty rail implementation only.Constructs a new buffer pointer for the specified byte buffer- Parameters:
buffer
- the array containing the bytes of the buffer.
-
-
Method Details
-
init
Deprecated.Rusty rail implementation only.(re)initializes the underlying buffer, creating a new buffer of the specified size- Parameters:
bufferSize
-- Returns:
- itself
-
invalidate
protected void invalidate()Deprecated.Invalidates the pointer, setting both the length and the position to zero. -
position
public int position()Deprecated.Returns the current buffer position- Returns:
- the current position
-
limit
public int limit()Deprecated.Returns the current sizeof the buffer- Returns:
- the size (or accessible limit) of the buffer
-