public class BytesLocation extends AbstractLocation
Constructor and Description |
---|
BytesLocation(byte[] bytes)
Creates a
BytesLocation backed by a ByteArrayByteBank
which wraps the specified array. |
BytesLocation(byte[] bytes,
int offset,
int length)
Creates a
BytesLocation backed by a ByteArrayByteBank with
the specified initial capacity and the provided data. |
BytesLocation(ByteArray bytes)
|
BytesLocation(ByteBank bytes)
Creates a
BytesLocation backed by the specified
ByteBank . |
BytesLocation(int initialCapacity)
Creates a
BytesLocation backed by a ByteArrayByteBank with
the specified initial capacity, but with a reported size of 0. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
ByteBank |
getByteBank()
Gets the backing
ByteBank . |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
defaultName, getName, getURI
public BytesLocation(ByteBank bytes)
BytesLocation
backed by the specified
ByteBank
.public BytesLocation(int initialCapacity)
BytesLocation
backed by a ByteArrayByteBank
with
the specified initial capacity, but with a reported size of 0. This method
can be used to avoid needing to grow the underlying ByteBank
.public BytesLocation(ByteArray bytes)
public BytesLocation(byte[] bytes)
BytesLocation
backed by a ByteArrayByteBank
which wraps the specified array.bytes
- the array to wrappublic BytesLocation(byte[] bytes, int offset, int length)
BytesLocation
backed by a ByteArrayByteBank
with
the specified initial capacity and the provided data.bytes
- the bytes to copy into the new BytesLocation
offset
- the offset in the bytes array to start copying fromlength
- the number of bytes to copy, starting from the offsetpublic int hashCode()
hashCode
in class AbstractLocation
public boolean equals(Object obj)
equals
in class AbstractLocation
Copyright © 2009–2018 SciJava. All rights reserved.