# Class DecompressPacketInputStream

java.lang.Object
org.mariadb.jdbc.internal.io.input.DecompressPacketInputStream

All Implemented Interfaces:
  `PacketInputStream`

public class DecompressPacketInputStream extends Object implements PacketInputStream

## Constructor Summary

Constructors
Constructor
Description
`DecompressPacketInputStream(InputStream in, int maxQuerySizeToLog, long threadId)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`int`
`getCompressLastPacketSeq()`
`InputStream`
`getInputStream()`
`int`
`getLastPacketSeq()`
`Buffer`
`getPacket(boolean reUsable)`
`byte[]`
`getPacketArray(boolean reUsable)`
Get next packet.
`void`
`setServerThreadId(long serverThreadId, Boolean isMaster)`
Set server thread id.
`void`
`setTraceCache(LruTraceCache traceCache)`

### Methods inherited from class Object

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

## Constructor Details

### DecompressPacketInputStream

public DecompressPacketInputStream(InputStream in, int maxQuerySizeToLog, long threadId)

## Method Details

### getPacket

public Buffer getPacket(boolean reUsable) throws IOException

Specified by:
  `getPacket` in interface `PacketInputStream`
Throws:
  `IOException`

### getPacketArray

public byte[] getPacketArray(boolean reUsable) throws IOException
Get next packet. Packet can be compressed, and if so, can contain many standard packet.

Specified by:
  `getPacketArray` in interface `PacketInputStream`
Parameters:
  `reUsable` - if can use existing reusable buffer to avoid creating array
Returns:
  array packet.
Throws:
  `IOException` - if socket exception occur.

### getLastPacketSeq

public int getLastPacketSeq()

Specified by:
  `getLastPacketSeq` in interface `PacketInputStream`

### getCompressLastPacketSeq

public int getCompressLastPacketSeq()

Specified by:
  `getCompressLastPacketSeq` in interface `PacketInputStream`

### close

public void close() throws IOException

Specified by:
  `close` in interface `PacketInputStream`
Throws:
  `IOException`

### setServerThreadId

public void setServerThreadId(long serverThreadId, Boolean isMaster)
Set server thread id.

Specified by:
  `setServerThreadId` in interface `PacketInputStream`
Parameters:
  `serverThreadId` - current server thread id.
  `isMaster` - is server master

### setTraceCache

public void setTraceCache(LruTraceCache traceCache)

Specified by:
  `setTraceCache` in interface `PacketInputStream`

### getInputStream

public InputStream getInputStream()

Specified by:
  `getInputStream` in interface `PacketInputStream`