| Package | Description |
|---|---|
| org.onlab.util |
Miscellaneous domain-agnostic utilities.
|
| Modifier and Type | Method and Description |
|---|---|
static ImmutableByteSequence |
ImmutableByteSequence.copyFrom(byte original)
Creates a new byte sequence of 1 byte containing the given value.
|
static ImmutableByteSequence |
ImmutableByteSequence.copyFrom(byte[] original)
Creates a new immutable byte sequence with the same content and order of
the passed byte array.
|
static ImmutableByteSequence |
ImmutableByteSequence.copyFrom(byte[] original,
int fromIdx,
int toIdx)
Creates a new immutable byte sequence with the same content and order of
the passed byte array, from/to the given indexes (inclusive).
|
static ImmutableByteSequence |
ImmutableByteSequence.copyFrom(ByteBuffer original)
Creates a new immutable byte sequence copying bytes from the given
ByteBuffer
ByteBuffer. |
static ImmutableByteSequence |
ImmutableByteSequence.copyFrom(int original)
Creates a new byte sequence of 4 bytes containing the given int value.
|
static ImmutableByteSequence |
ImmutableByteSequence.copyFrom(long original)
Creates a new byte sequence of 8 bytes containing the given long value.
|
static ImmutableByteSequence |
ImmutableByteSequence.copyFrom(short original)
Creates a new byte sequence of 2 bytes containing the given short value.
|
static ImmutableByteSequence |
ImmutableByteSequence.ofOnes(int size)
Creates a new byte sequence of the given size where alla bits are 1.
|
static ImmutableByteSequence |
ImmutableByteSequence.ofZeros(int size)
Creates a new byte sequence of the given size where alla bits are 0.
|
Copyright © 2016. All rights reserved.