Constructor and Description |
---|
ByteArrayByteBank()
Creates a
ByteArrayByteBank . |
ByteArrayByteBank(byte[] bytes)
Creates a
ByteArrayByteBank that wraps the provided byte array. |
ByteArrayByteBank(ByteArray bytes)
Creates a
ByteArrayByteBank that wraps the specified
ByteArray . |
ByteArrayByteBank(int initialCapacity)
Creates a
ByteArrayByteBank with the specified initial capacity. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the buffer
|
byte |
getByte(long pos) |
int |
getBytes(long startPos,
byte[] b,
int offset,
int length) |
long |
getMaxBufferSize() |
void |
setByte(long pos,
byte b)
Sets the byte at the given position
|
void |
setBytes(long startpos,
byte[] bytes,
int offset,
int length)
Sets the bytes starting form the given position to the values form the
provided array.
|
long |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendBytes, appendBytes, basicRangeCheck, checkReadPos, checkWritePos, getBytes, isReadOnly, toByteArray, toByteArray
public ByteArrayByteBank()
ByteArrayByteBank
.public ByteArrayByteBank(int initialCapacity)
ByteArrayByteBank
with the specified initial capacity.initialCapacity
- the initial capacity of this ByteBank
public ByteArrayByteBank(byte[] bytes)
ByteArrayByteBank
that wraps the provided byte array.bytes
- the bytes to wrappublic ByteArrayByteBank(ByteArray bytes)
ByteArrayByteBank
that wraps the specified
ByteArray
.bytes
- the ByteArray
to wrappublic long getMaxBufferSize()
getMaxBufferSize
in interface ByteBank
public void setBytes(long startpos, byte[] bytes, int offset, int length)
ByteBank
public void setByte(long pos, byte b)
ByteBank
public void clear()
ByteBank
public byte getByte(long pos)
public int getBytes(long startPos, byte[] b, int offset, int length)
Copyright © 2015–2022 SciJava. All rights reserved.