Fix stuff, implement missing toString()
This commit is contained in:
parent
52a46555f7
commit
516e34c6a0
|
@ -136,8 +136,9 @@ public class CommandLineInterface {
|
|||
}
|
||||
|
||||
private void help() {
|
||||
HelpFormatter formater = new HelpFormatter();
|
||||
formater.printHelp(" ", options);
|
||||
HelpFormatter formatter = new HelpFormatter();
|
||||
formatter.setWidth(120);
|
||||
formatter.printHelp(" ", options);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
|
|
|
@ -4,7 +4,6 @@ import org.pcap4j.packet.EthernetPacket;
|
|||
|
||||
import com.orientechnologies.orient.core.metadata.schema.OType;
|
||||
import com.orientechnologies.orient.core.record.impl.ODocument;
|
||||
import com.tinkerpop.blueprints.Vertex;
|
||||
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
|
||||
import com.tinkerpop.blueprints.impls.orient.OrientVertexType;
|
||||
|
||||
|
@ -73,5 +72,20 @@ public class EthernetFrameModel implements Model {
|
|||
return arguments;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("EthernetFrame[");
|
||||
sb.append(this.timestamp);
|
||||
sb.append(".");
|
||||
sb.append(this.microseconds);
|
||||
sb.append("] ");
|
||||
sb.append(this.sourceMac);
|
||||
sb.append(" -> ");
|
||||
sb.append(this.targetMac);
|
||||
sb.append(" (");
|
||||
sb.append(this.size);
|
||||
sb.append(" bytes) ");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue