Package freenet.support

Examples of freenet.support.ByteBufferInputStream


  short priority;
  private boolean needsLoadRT;
  private boolean needsLoadBulk;
 
  public static Message decodeMessageFromPacket(byte[] buf, int offset, int length, PeerContext peer, int overhead) {
    ByteBufferInputStream bb = new ByteBufferInputStream(buf, offset, length);
    return decodeMessage(bb, peer, length + overhead, true, false, false);
  }
View Full Code Here


    ByteBufferInputStream bb = new ByteBufferInputStream(buf, offset, length);
    return decodeMessage(bb, peer, length + overhead, true, false, false);
  }
 
  public static Message decodeMessageLax(byte[] buf, PeerContext peer, int overhead) {
    ByteBufferInputStream bb = new ByteBufferInputStream(buf);
    return decodeMessage(bb, peer, buf.length + overhead, true, false, true);
  }
View Full Code Here

          m.set(name, Serializer.readFromDataInputStream(type, bb));
        }
      }
      if (mayHaveSubMessages) {
        while (bb.remaining() > 2) { // sizeof(unsigned short) == 2
          ByteBufferInputStream bb2;
          try {
            int size = bb.readUnsignedShort();
            if (bb.remaining() < size) return m;
            bb2 = bb.slice(size);
          } catch (EOFException e) {
View Full Code Here

TOP

Related Classes of freenet.support.ByteBufferInputStream

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.