Package nom.tam.util

Class BufferPointer

java.lang.Object
nom.tam.util.BufferPointer

@Deprecated public class BufferPointer extends Object
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
    Modifier and Type
    Field
    Description
    protected byte[]
    Deprecated.
    The data buffer.
    protected int
    Deprecated.
    The number of valid characters in the buffer
    protected int
    Deprecated.
    The current offset into the buffer
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Rusty rail implementation only.
    BufferPointer(byte[] buffer)
    Deprecated.
    Rusty rail implementation only.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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
    Deprecated.
    Returns the current sizeof the buffer
    int
    Deprecated.
    Returns the current buffer position

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • buffer

      protected byte[] buffer
      Deprecated.
      The data buffer.
    • length

      protected int length
      Deprecated.
      The number of valid characters in the buffer
    • pos

      protected int pos
      Deprecated.
      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

      protected BufferPointer init(int bufferSize)
      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