Package ru.yandex.clickhouse.response

## Class ByteFragment

- java.lang.Object
- - ru.yandex.clickhouse.response.ByteFragment

Direct Known Subclasses:
  `ArrayByteFragment`

    public class ByteFragment
    extends Object

### Field Summary

Fields
`protected byte[]` `buf`
`protected int` `len`
`protected int` `start`

### Constructor Summary

Constructors
`ByteFragment​(byte[] buf, int start, int len)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`ByteArrayInputStream` `asStream()`
`String` `asString()`
`String` `asString​(boolean unescape)`
`int` `charAt​(int i)`
`static void` `escape​(byte[] bytes, OutputStream stream)`
`static ByteFragment` `fromString​(String str)`
`int` `getLen()`
`boolean` `isEmpty()`
`boolean` `isNaN()`
`boolean` `isNull()`
`int` `length()`
`ByteFragment[]` `split​(byte sep)`
`ByteFragment` `subseq​(int start, int len)`
`String` `toString()`
`byte[]` `unescape()`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### buf

    protected final byte[] buf

#### start

    protected final int start

#### len

    protected final int len

### Constructor Detail

#### ByteFragment

    public ByteFragment​(byte[] buf,
                        int start,
                        int len)

### Method Detail

#### fromString

    public static ByteFragment fromString​(String str)

#### asString

    public String asString()

#### asString

    public String asString​(boolean unescape)

#### isNull

    public boolean isNull()

#### isEmpty

    public boolean isEmpty()

#### isNaN

    public boolean isNaN()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### split

    public ByteFragment[] split​(byte sep)

#### asStream

    public ByteArrayInputStream asStream()

#### getLen

    public int getLen()

#### unescape

    public byte[] unescape()

#### escape

    public static void escape​(byte[] bytes,
                              OutputStream stream)
                       throws IOException

Throws:
  `IOException`

#### length

    public int length()

#### charAt

    public int charAt​(int i)

#### subseq

    public ByteFragment subseq​(int start,
                               int len)