Class PcapWriter
java.lang.Object
io.netty.handler.pcap.PcapWriter
- All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable
final class PcapWriter
extends java.lang.Object
implements java.io.Closeable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final InternalLoggerLoggerprivate final java.io.OutputStreamReference declared so that we can use this as mutex in clean way.private final PcapWriteHandler -
Constructor Summary
ConstructorsConstructorDescriptionPcapWriter(PcapWriteHandler pcapWriteHandler) This usesOutputStreamfor writing Pcap data. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()java.lang.StringtoString()(package private) voidwritePacket(ByteBuf packetHeaderBuf, ByteBuf packet) Write Packet in Pcap OutputStream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
logger
Logger -
pcapWriteHandler
-
outputStream
private final java.io.OutputStream outputStreamReference declared so that we can use this as mutex in clean way.
-
-
Constructor Details
-
PcapWriter
PcapWriter(PcapWriteHandler pcapWriteHandler) throws java.io.IOException This usesOutputStreamfor writing Pcap data.- Throws:
java.io.IOException- IfOutputStream.write(byte[])throws an exception
-
-
Method Details
-
writePacket
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-