Class ByteVector

java.lang.Object
com.aowagie.text.pdf.hyphenation.ByteVector
All Implemented Interfaces:
Serializable

class ByteVector extends Object implements Serializable
This class implements a simple byte vector with access to the underlying array.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private byte[]
    The encapsulated array
    private int
     
    private static final int
    Capacity increment size
    private int
    Points to next free item
    private static final long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    private
    ByteVector(int capacity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) int
    alloc(int size)
    This is to implement memory allocation in the array.
    (package private) byte
    get(int index)
     
    byte[]
     
    (package private) int
    return number of items in array
    (package private) void
     

    Methods inherited from class java.lang.Object

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

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • DEFAULT_BLOCK_SIZE

      private static final int DEFAULT_BLOCK_SIZE
      Capacity increment size
      See Also:
    • blockSize

      private int blockSize
    • array

      private byte[] array
      The encapsulated array
    • n

      private int n
      Points to next free item
  • Constructor Details

    • ByteVector

      public ByteVector()
    • ByteVector

      private ByteVector(int capacity)
  • Method Details

    • getArray

      public byte[] getArray()
    • length

      int length()
      return number of items in array
    • get

      byte get(int index)
    • alloc

      int alloc(int size)
      This is to implement memory allocation in the array. Like malloc().
    • trimToSize

      void trimToSize()