io.etcd.jetcd

## Class ByteSequence

- java.lang.Object
- - io.etcd.jetcd.ByteSequence

    public final class ByteSequence
    extends Object

Etcd binary bytes, easy to convert between byte[], String and ByteString.

### Field Summary

Fields
`static ByteSequence` `EMPTY`
`static ByteSequence` `NAMESPACE_DELIMITER`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals(Object obj)`
`static ByteSequence` `from(byte[] source)`
`static ByteSequence` `from(com.google.protobuf.ByteString source)`
`static ByteSequence` `from(String source, Charset charset)` Create new ByteSequence from a String.
`byte[]` `getBytes()`
`int` `hashCode()`
`boolean` `isEmpty()`
`int` `size()`
`boolean` `startsWith(ByteSequence prefix)`
`String` `toString(Charset charset)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### EMPTY

    public static final ByteSequence EMPTY

#### NAMESPACE_DELIMITER

    public static final ByteSequence NAMESPACE_DELIMITER

### Method Detail

#### startsWith

    public boolean startsWith(ByteSequence prefix)

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString(Charset charset)

#### getBytes

    public byte[] getBytes()

#### isEmpty

    public boolean isEmpty()

#### size

    public int size()

#### from

    public static ByteSequence from(String source,
                                    Charset charset)

Create new ByteSequence from a String.

Parameters:
  `source` - input String
  `charset` - the character set to use to transform the String into bytes
Returns:
  the ByteSequence

#### from

    public static ByteSequence from(com.google.protobuf.ByteString source)

#### from

    public static ByteSequence from(byte[] source)