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(byte[] bytes,
int offset,
int length,
String name)
Creates a
BytesLocation backed by a ByteArrayByteBank with
the specified initial capacity and the provided data. |
BytesLocation(byte[] bytes,
String name)
Creates a
BytesLocation backed by a ByteArrayByteBank which
wraps the specified array. |
BytesLocation(ByteArray bytes)
|
BytesLocation(ByteArray bytes,
String name)
|
BytesLocation(ByteBank bytes)
Creates a
BytesLocation backed by the specified
ByteBank . |
BytesLocation(ByteBank bytes,
String name)
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. |
BytesLocation(int initialCapacity,
String name)
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 . |
String |
getName()
Gets a (typically short) name expressing this location.
|
int |
hashCode() |
toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
defaultName, getURI
public BytesLocation(ByteBank bytes)
BytesLocation
backed by the specified
ByteBank
.public BytesLocation(ByteBank bytes, String name)
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(int initialCapacity, String name)
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
.name
- the name of this Location
public BytesLocation(ByteArray bytes)
public BytesLocation(ByteArray bytes, String name)
name
- the name of this Location.public BytesLocation(byte[] bytes)
BytesLocation
backed by a ByteArrayByteBank
which wraps the specified array.bytes
- the array to wrappublic BytesLocation(byte[] bytes, String name)
BytesLocation
backed by a ByteArrayByteBank
which
wraps the specified array.bytes
- the array to wrapname
- the name of this Location.public 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 BytesLocation(byte[] bytes, int offset, int length, String name)
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 offsetname
- the name of this Location.public String getName()
Location
public int hashCode()
hashCode
in class AbstractLocation
public boolean equals(Object obj)
equals
in class AbstractLocation
Copyright © 2015–2022 SciJava. All rights reserved.