org.mariadb.jdbc.internal.packet.read

## Class ReadResultPacketFactory

- java.lang.Object
- - org.mariadb.jdbc.internal.packet.read.ReadResultPacketFactory

    public class ReadResultPacketFactory
    extends Object

Creates result packets only handles error, ok, eof and result set packets since field and row packets require a previous result set stream.

### Field Summary

Fields
`static byte` `EOF`
`static byte` `ERROR`
`static byte` `LOCALINFILE`
`static byte` `OK`

### Method Summary

All Methods Static Methods Concrete Methods
`static AbstractResultPacket` `createResultPacket(ByteBuffer byteBuffer)` Initialize a result stream according to first stream byte.
`static AbstractResultPacket` `createResultPacket(ReadPacketFetcher packetFetcher)` Initialize a result stream according to first stream byte.

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

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

### Field Detail

#### ERROR

    public static final byte ERROR

See Also:
  Constant Field Values

#### OK

    public static final byte OK

See Also:
  Constant Field Values

#### EOF

    public static final byte EOF

See Also:
  Constant Field Values

#### LOCALINFILE

    public static final byte LOCALINFILE

See Also:
  Constant Field Values

### Method Detail

#### createResultPacket

    public static AbstractResultPacket createResultPacket(ReadPacketFetcher packetFetcher)
                                                   throws IOException

Initialize a result stream according to first stream byte.

Parameters:
  `packetFetcher` - stream fetcher
Returns:
  a result stream
Throws:
  `IOException` - in case of an incorrect ResultSetPacket

#### createResultPacket

    public static AbstractResultPacket createResultPacket(ByteBuffer byteBuffer)
                                                   throws IOException

Initialize a result stream according to first stream byte.

Parameters:
  `byteBuffer` - stream fetcher
Returns:
  a result stream
Throws:
  `IOException` - in case of an incorrect ResultSetPacket