Package com.slytechs.file.pcap

Examples of com.slytechs.file.pcap.PcapFileCapture


  private static final Log logger = Captures.logger;

  public FormatType formatType(final File file) throws IOException {

    try {
      new PcapFileCapture(file, FileMode.ReadOnlyNoMap, null).close();

      if (logger.isTraceEnabled()) {
        logger.trace(file.getName() + ", type=" + FormatType.Pcap);
      }
View Full Code Here


  }

  public FormatType.Detail formatTypeDetail(final File file) throws IOException {

    try {
      new PcapFileCapture(file, FileMode.ReadOnlyNoMap, null).close();

      if (logger.isTraceEnabled()) {
        logger.trace(file.getName() + ", type=" + FormatType.Pcap);
      }
View Full Code Here

          + (filter == null ? "" : ", filter=" + filter));
    }

    FileCapture capture;
    if (type == PcapFile.class) {
      capture = new PcapFileCapture(file, mode, null);
    } else if (type == SnoopFile.class) {
      capture = new SnoopFileCapture(file, mode, null);
    } else {
      throw new FileFormatException("Unsupported file format type, "
          + type.getName());
View Full Code Here

      return null;
    }

    switch (type) {
      case Pcap:
        capture = new PcapFileCapture(file, mode, filter);
        break;
      case Snoop:
        capture = new SnoopFileCapture(file, mode, filter);
        break;
      case Nap:
View Full Code Here

TOP

Related Classes of com.slytechs.file.pcap.PcapFileCapture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.