Files
CrossJeeves/src/com/flaremicro/crossjeeves/net/packet/Packet7LogEntry.java
Flare Microsystems a2a5322835 Add missing files
2024-11-11 08:47:15 -08:00

56 lines
1.0 KiB
Java

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();
}
}