Add missing files
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
package com.flaremicro.crossjeeves.net.packet;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.flaremicro.crossjeeves.net.NetworkHandler;
|
||||
|
||||
public class Packet7LogEntry extends Packet{
|
||||
|
||||
public static final byte STD_OUT = 0;
|
||||
public static final byte STD_ERR = 1;
|
||||
|
||||
private byte std;
|
||||
private String logEntry;
|
||||
|
||||
public Packet7LogEntry(){
|
||||
}
|
||||
|
||||
public Packet7LogEntry(byte std, String logEntry){
|
||||
this.std = std;
|
||||
this.logEntry = logEntry;
|
||||
}
|
||||
|
||||
public void recievePacket(DataInputStream in) throws IOException {
|
||||
std = in.readByte();
|
||||
logEntry = in.readUTF();
|
||||
}
|
||||
|
||||
public void sendPacket(DataOutputStream out) throws IOException {
|
||||
super.sendPacket(out);
|
||||
out.writeByte(std);
|
||||
out.writeUTF(logEntry);
|
||||
}
|
||||
|
||||
public void processPacket(NetworkHandler networkHandler){
|
||||
networkHandler.handlePacket(this);
|
||||
}
|
||||
|
||||
public byte getStdOutput()
|
||||
{
|
||||
return std;
|
||||
}
|
||||
|
||||
public String getLogEntry(){
|
||||
return this.logEntry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet cloneTypeOnly() {
|
||||
return new Packet7LogEntry();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user