类 GrowableMemoryByteArray

java.lang.Object
com.google.typography.font.sfntly.data.ByteArray<GrowableMemoryByteArray>
com.google.typography.font.sfntly.data.GrowableMemoryByteArray

final class GrowableMemoryByteArray extends ByteArray<GrowableMemoryByteArray>
A growable memory implementation of the ByteArray interface.
作者:
Stuart Gill
  • 字段详细资料

    • INITIAL_LENGTH

      private static final int INITIAL_LENGTH
      另请参阅:
    • b

      private byte[] b
  • 构造器详细资料

    • GrowableMemoryByteArray

      public GrowableMemoryByteArray()
  • 方法详细资料

    • internalPut

      protected void internalPut(int index, byte b)
      从类复制的说明: ByteArray
      Stores the byte at the index given.
      指定者:
      internalPut 在类中 ByteArray<GrowableMemoryByteArray>
      参数:
      index - the location to store at
      b - the byte to store
    • internalPut

      protected int internalPut(int index, byte[] b, int offset, int length)
      从类复制的说明: ByteArray
      Stores the array of bytes at the given index.
      指定者:
      internalPut 在类中 ByteArray<GrowableMemoryByteArray>
      参数:
      index - the location to store at
      b - the bytes to store
      offset - the offset to start from in the byte array
      length - the length of the byte array to store from the offset
      返回:
      the number of bytes actually stored
    • internalGet

      protected int internalGet(int index)
      从类复制的说明: ByteArray
      Gets the byte at the index given.
      指定者:
      internalGet 在类中 ByteArray<GrowableMemoryByteArray>
      参数:
      index - the location to get from
      返回:
      the byte stored at the index
    • internalGet

      protected int internalGet(int index, byte[] b, int offset, int length)
      从类复制的说明: ByteArray
      Gets the bytes at the index given of the given length.
      指定者:
      internalGet 在类中 ByteArray<GrowableMemoryByteArray>
      参数:
      index - the location to start getting from
      b - the array to put the bytes into
      offset - the offset in the array to put the bytes into
      length - the length of bytes to read
      返回:
      the number of bytes actually ready
    • close

      public void close()
      从类复制的说明: ByteArray
      Close this instance of the ByteArray.
      指定者:
      close 在类中 ByteArray<GrowableMemoryByteArray>
    • copyTo

      public int copyTo(OutputStream os, int offset, int length) throws IOException
      从类复制的说明: ByteArray
      Copies this ByteArray to an OutputStream.
      覆盖:
      copyTo 在类中 ByteArray<GrowableMemoryByteArray>
      参数:
      os - the destination
      offset -
      length -
      返回:
      the number of bytes copied
      抛出:
      IOException
    • growTo

      private void growTo(int newSize)