Class Packet
- java.lang.Object
-
- tk.doraneko.tcp.sendfile.largefile.models.Packet
-
public class Packet extends Object
- Since:
- 14/10/2019
- Author:
- tranphuquy19@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMMAND_REQUEST_SEND_FILE_DATA
static String
COMMAND_SEND_FILE
static String
COMMAND_SEND_FILE_DATA
static String
COMMAND_SEND_FILE_LENGTH
static String
COMMAND_SEND_FILE_NAME
static String
COMMAND_SEND_FINISH
static String
COMMAND_SEND_TEXT
static byte
INITIALIZE
static byte
SEPARATOR
-
Constructor Summary
Constructors Constructor Description Packet()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
createDataPacket(String command, byte[] data)
static byte[]
readStream(DataInputStream dataInputStream)
-
-
-
Field Detail
-
INITIALIZE
public static final byte INITIALIZE
- See Also:
- Constant Field Values
-
SEPARATOR
public static final byte SEPARATOR
- See Also:
- Constant Field Values
-
COMMAND_SEND_TEXT
public static final String COMMAND_SEND_TEXT
- See Also:
- Constant Field Values
-
COMMAND_SEND_FILE
public static final String COMMAND_SEND_FILE
- See Also:
- Constant Field Values
-
COMMAND_SEND_FILE_NAME
public static final String COMMAND_SEND_FILE_NAME
- See Also:
- Constant Field Values
-
COMMAND_SEND_FILE_LENGTH
public static final String COMMAND_SEND_FILE_LENGTH
- See Also:
- Constant Field Values
-
COMMAND_REQUEST_SEND_FILE_DATA
public static final String COMMAND_REQUEST_SEND_FILE_DATA
- See Also:
- Constant Field Values
-
COMMAND_SEND_FILE_DATA
public static final String COMMAND_SEND_FILE_DATA
- See Also:
- Constant Field Values
-
COMMAND_SEND_FINISH
public static final String COMMAND_SEND_FINISH
- See Also:
- Constant Field Values
-
-
Method Detail
-
createDataPacket
public static byte[] createDataPacket(String command, byte[] data) throws IOException
- Throws:
IOException
-
readStream
public static byte[] readStream(DataInputStream dataInputStream) throws IOException, NullPointerException
- Throws:
IOException
NullPointerException
-
-