Package com.slytechs.utils.memory.channel

Examples of com.slytechs.utils.memory.channel.BufferedReadableByteChannel.mark()


     * Wrap the original input in buffer channel so that we can rewind and check
     * various types.
     */

    final BufferedReadableByteChannel b = new BufferedReadableByteChannel(in);
    b.mark(24); // Max number of bytes of all the known block headers

    if (PcapInputCapture.checkFormat(b) != null) {
      return FormatType.Pcap;
    }

View Full Code Here


     * Wrap the original input in buffer channel so that we can rewind and check
     * various types.
     */

    final BufferedReadableByteChannel b = new BufferedReadableByteChannel(in);
    b.mark(24); // Max number of bytes of all the known block headers

    if (PcapInputCapture.checkFormat(b) != null) {
      return new DefaultFormatTypeDetail(FormatType.Pcap);
    }

View Full Code Here

  public <T extends InputCapture<? extends FilePacket>> T newInput(
      final Class<T> t, final ReadableByteChannel in,
      final Filter<ProtocolFilterTarget> filter) throws IOException {
    if (t == PcapInput.class) {
      final BufferedReadableByteChannel b = new BufferedReadableByteChannel(in);
      b.mark(4);

      ByteOrder order = PcapInputCapture.checkFormat(b);

      b.reset();
      return t.cast(new PcapInputCapture(b, order, filter));
View Full Code Here

  public InputCapture<? extends CapturePacket> newInput(
      final ReadableByteChannel in, final Filter<ProtocolFilterTarget> filter)
      throws IOException {

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

    final FormatType type = this.formatType(b);

    switch (type) {
      case Pcap:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.