org.mariadb.jdbc.internal.common.packet

## Class RawPacket

- java.lang.Object
- - org.mariadb.jdbc.internal.common.packet.RawPacket

    public final class RawPacket
    extends Object

Class to represent a raw packet as transferred over the wire. First we got 3 bytes specifying the actual length, then one byte packet sequence number and then n bytes with user data.

### Constructor Summary

Constructors
Constructor and Description
`RawPacket(ByteBuffer byteBuffer, int packetSeq)` create a raw packet.

### Method Summary

Methods
`ByteBuffer` `getByteBuffer()` Get the byte buffer backing this packet
`int` `getPacketSeq()` Get the package sequence number

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

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

### Constructor Detail

#### RawPacket

    public RawPacket(ByteBuffer byteBuffer,
             int packetSeq)

create a raw packet.

Parameters:
  `byteBuffer` - the byte buffer containing the packet
  `packetSeq` - the packet sequence

### Method Detail

#### getByteBuffer

    public ByteBuffer getByteBuffer()

Get the byte buffer backing this packet

Returns:
  a read only byte buffer

#### getPacketSeq

    public int getPacketSeq()

Get the package sequence number

Returns:
  the sequence number of the package