Class ChunkedPacket
- java.lang.Object
-
- de.dytanic.cloudnet.driver.network.protocol.Packet
-
- de.dytanic.cloudnet.driver.network.protocol.chunk.ChunkedPacket
-
-
Field Summary
-
Fields inherited from class de.dytanic.cloudnet.driver.network.protocol.Packet
body, channel, creationMillis, EMPTY, EMPTY_PACKET_BYTE_ARRAY, header, uniqueId
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedChunkedPacket(int channel, @NotNull java.util.UUID uniqueId, @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header, int chunkId, int chunkSize, int dataLength, boolean end, byte[] data, int chunks)protectedChunkedPacket(int channel, @NotNull java.util.UUID uniqueId, @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header, ProtocolBuffer body)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearData()static ChunkedPacketcreateIncomingPacket(int channel, @NotNull java.util.UUID uniqueId, @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header, ProtocolBuffer body)ChunkedPacketfillBuffer()intgetChunkId()intgetChunks()byte[]getData()intgetDataLength()booleanisEnd()@NotNull ChunkedPacketreadBuffer()voidreadData(@NotNull java.io.OutputStream outputStream)-
Methods inherited from class de.dytanic.cloudnet.driver.network.protocol.Packet
createResponseFor, createResponseFor, createResponseFor, createResponseFor, getBodyAsArray, getBuffer, getChannel, getCreationMillis, getHeader, getUniqueId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.dytanic.cloudnet.driver.network.protocol.IPacket
isShowDebug
-
-
-
-
Constructor Detail
-
ChunkedPacket
protected ChunkedPacket(int channel, @NotNull @NotNull java.util.UUID uniqueId, @NotNull @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header, int chunkId, int chunkSize, int dataLength, boolean end, byte[] data, int chunks)
-
ChunkedPacket
protected ChunkedPacket(int channel, @NotNull @NotNull java.util.UUID uniqueId, @NotNull @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header, ProtocolBuffer body)
-
-
Method Detail
-
createIncomingPacket
public static ChunkedPacket createIncomingPacket(int channel, @NotNull @NotNull java.util.UUID uniqueId, @NotNull @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header, ProtocolBuffer body)
-
fillBuffer
public ChunkedPacket fillBuffer()
-
readBuffer
@NotNull public @NotNull ChunkedPacket readBuffer()
-
readData
public void readData(@NotNull @NotNull java.io.OutputStream outputStream) throws java.io.IOException- Throws:
java.io.IOException
-
getChunks
public int getChunks()
-
getChunkId
public int getChunkId()
-
getDataLength
public int getDataLength()
-
isEnd
public boolean isEnd()
-
getData
public byte[] getData()
-
clearData
public void clearData()
-
-