Example usage for java.lang Byte BYTES

List of usage examples for java.lang Byte BYTES

Introduction

In this page you can find the example usage for java.lang Byte BYTES.

Prototype

int BYTES

To view the source code for java.lang Byte BYTES.

Click Source Link

Document

The number of bytes used to represent a byte value in two's complement binary form.

Usage

From source file:Main.java

public static void main(String... args) {
    System.out.println(Byte.BYTES);
}

From source file:ru.jts_dev.common.packets.IncomingMessageWrapper.java

public final byte readByte() {
    if (payload.readableBytes() < Byte.BYTES)
        throw new IndexOutOfBoundsException("At least 1 byte1 must be readable in payload");

    return payload.readByte();
}

From source file:org.onlab.util.ImmutableByteSequence.java

/**
 * Creates a new byte sequence of 1 byte containing the given value.
 *
 * @param original a byte value// w  w  w  .j a va 2 s.  c o m
 * @return a new immutable byte sequence
 */
public static ImmutableByteSequence copyFrom(byte original) {
    return new ImmutableByteSequence(ByteBuffer.allocate(Byte.BYTES).put(original));
}