public abstract class BytesInput extends Object
Constructor and Description |
---|
BytesInput() |
Modifier and Type | Method and Description |
---|---|
static BytesInput |
concat(BytesInput... inputs)
logically concatenate the provided inputs
|
static BytesInput |
concat(List<BytesInput> inputs)
logically concatenate the provided inputs
|
static BytesInput |
copy(BytesInput bytesInput)
copies the input into a new byte array
|
static BytesInput |
empty() |
static BytesInput |
from(byte[] in) |
static BytesInput |
from(byte[] in,
int offset,
int length) |
static BytesInput |
from(ByteArrayOutputStream baos) |
static BytesInput |
from(CapacityByteArrayOutputStream arrayOut) |
static BytesInput |
from(InputStream in,
int bytes) |
static BytesInput |
fromInt(int intValue) |
static BytesInput |
fromUnsignedVarInt(int intValue) |
static BytesInput |
fromZigZagVarInt(int intValue) |
abstract long |
size() |
byte[] |
toByteArray() |
abstract void |
writeAllTo(OutputStream out)
writes the bytes into a stream
|
public static BytesInput concat(BytesInput... inputs)
inputs
- the inputs to concatenatepublic static BytesInput concat(List<BytesInput> inputs)
inputs
- the inputs to concatenatepublic static BytesInput from(InputStream in, int bytes)
in
- bytes
- number of bytes to readpublic static BytesInput from(byte[] in)
in
- public static BytesInput from(byte[] in, int offset, int length)
public static BytesInput fromInt(int intValue)
intValue
- the int to writepublic static BytesInput fromUnsignedVarInt(int intValue)
intValue
- the int to writepublic static BytesInput fromZigZagVarInt(int intValue)
intValue
- the int to writepublic static BytesInput from(CapacityByteArrayOutputStream arrayOut)
arrayOut
- public static BytesInput from(ByteArrayOutputStream baos)
arrayOut
- public static BytesInput empty()
public static BytesInput copy(BytesInput bytesInput) throws IOException
bytesInput
- IOException
public abstract void writeAllTo(OutputStream out) throws IOException
out
- IOException
public byte[] toByteArray() throws IOException
IOException
public abstract long size()
Copyright © 2015. All rights reserved.