Package one.nio.util

Class ByteArrayBuilder

java.lang.Object
one.nio.util.ByteArrayBuilder

public class ByteArrayBuilder extends Object
  • Field Details

    • TRUE

      protected static final byte[] TRUE
    • FALSE

      protected static final byte[] FALSE
    • buf

      protected byte[] buf
    • count

      protected int count
  • Constructor Details

    • ByteArrayBuilder

      public ByteArrayBuilder()
    • ByteArrayBuilder

      public ByteArrayBuilder(int capacity)
  • Method Details

    • buffer

      public final byte[] buffer()
    • length

      public final int length()
    • setLength

      public final void setLength(int newCount)
    • capacity

      public final int capacity()
    • byteAt

      public final byte byteAt(int index)
    • crop

      public final void crop(int offset)
    • trim

      public final byte[] trim()
    • toBytes

      public final byte[] toBytes()
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • append

      public final ByteArrayBuilder append(byte b)
    • append

      public final ByteArrayBuilder append(byte[] b)
    • append

      public final ByteArrayBuilder append(byte[] b, int offset, int length)
    • append

      public final ByteArrayBuilder append(ByteBuffer bb, int length)
    • append

      public final ByteArrayBuilder append(String s)
    • append

      public final ByteArrayBuilder append(boolean b)
    • append

      public final ByteArrayBuilder append(char c)
    • append

      public final ByteArrayBuilder append(int n)
    • append

      public final ByteArrayBuilder append(long n)
    • appendCodePoint

      public final ByteArrayBuilder appendCodePoint(int c)
    • appendHex

      public final ByteArrayBuilder appendHex(int n)
    • appendHex

      public final ByteArrayBuilder appendHex(long n)