Package org.jnetstream.capture

Examples of org.jnetstream.capture.FormatType


      throws IOException {

    final BufferedReadableByteChannel b = new BufferedReadableByteChannel(in);
    b.mark(24);

    final FormatType type = this.formatType(b);

    switch (type) {
      case Pcap:
        b.reset();
        ByteOrder order = PcapInputCapture.checkFormat(b);
View Full Code Here


    /*
     * Now try InputCapture which may also yield a known format
     */
    ReadableByteChannel channel = new RandomAccessFile(file, "r").getChannel();
    FormatType type = formatType(channel);
    channel.close();

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

    if (logger.isDebugEnabled()) {
      logger.debug(file.getName() + ", mode=" + mode
          + (filter == null ? "" : ", filter=" + filter));
    }

    final FormatType type = this.formatType(file);
    FileCapture<? extends FilePacket> capture = null;

    if (type == null) {
      return null;
    }
View Full Code Here

  public List<File> splitFile(final File file, final long packetCount,
      final boolean maxCompression) throws IOException {

    final FileCapture<? extends FilePacket> source = openFile(file);
    final FormatType type = source.getFormatType();

    final List<File> files = new ArrayList<File>(100);
    final List<Packet> packets = new ArrayList<Packet>((int) packetCount);

    int fileCount = 0;
View Full Code Here

    // TODO Auto-generated method stub
    return false;
  }

  public long countPackets(File dst) throws IOException, FileFormatException {
    final FormatType type = formatType(dst);
    if (type == null) {
      throw new FileFormatException("Unrecognized file format");
    }

    final long count;
View Full Code Here

TOP

Related Classes of org.jnetstream.capture.FormatType

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.