类 GrowableMemoryByteArray
java.lang.Object
com.google.typography.font.sfntly.data.ByteArray<GrowableMemoryByteArray>
com.google.typography.font.sfntly.data.GrowableMemoryByteArray
A growable memory implementation of the ByteArray interface.
- 作者:
- Stuart Gill
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
close()
Close this instance of the ByteArray.int
copyTo
(OutputStream os, int offset, int length) Copies this ByteArray to an OutputStream.private void
growTo
(int newSize) protected int
internalGet
(int index) Gets the byte at the index given.protected int
internalGet
(int index, byte[] b, int offset, int length) Gets the bytes at the index given of the given length.protected void
internalPut
(int index, byte b) Stores the byte at the index given.protected int
internalPut
(int index, byte[] b, int offset, int length) Stores the array of bytes at the given index.
-
字段详细资料
-
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 atb
- 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 atb
- the bytes to storeoffset
- the offset to start from in the byte arraylength
- 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 fromb
- the array to put the bytes intooffset
- the offset in the array to put the bytes intolength
- 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
从类复制的说明:ByteArray
Copies this ByteArray to an OutputStream.- 覆盖:
copyTo
在类中ByteArray<GrowableMemoryByteArray>
- 参数:
os
- the destinationoffset
-length
-- 返回:
- the number of bytes copied
- 抛出:
IOException
-
growTo
private void growTo(int newSize)
-