Class Bytes
java.lang.Object
com.palantir.conjure.java.lib.Bytes
An immutable
byte[] wrapper.-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns a new byte array containing the same content as this object's underlyingbyte[].Returns a new read-onlyByteBufferbacked by this byte array.voidcopyTo(byte[] destination, int offset, int length) Copies this byte array into the provided byte array beginning at offset and up to the provided length.booleanstatic Bytesfrom(byte[] array) Constructs a newBytesfrom the provided array.static Bytesfrom(byte[] array, int offset, int length) Constructs a newBytesread from provided offset for the provided length.static Bytesfrom(ByteBuffer buffer) Constructs a newBytesread from the providedByteBuffer.Returns a newInputStreamthat reads this byte array.inthashCode()intsize()Returns the size of this byte array.toString()
-
Method Details
-
asReadOnlyByteBuffer
Returns a new read-onlyByteBufferbacked by this byte array. -
asNewByteArray
public byte[] asNewByteArray()Returns a new byte array containing the same content as this object's underlyingbyte[]. -
copyTo
public void copyTo(byte[] destination, int offset, int length) Copies this byte array into the provided byte array beginning at offset and up to the provided length. -
getInputStream
Returns a newInputStreamthat reads this byte array. -
size
public int size()Returns the size of this byte array. -
hashCode
-
equals
-
toString
-
from
-
from
-
from
Constructs a newBytesread from the providedByteBuffer.
-