org.mpisws.p2p.transport.peerreview.audit
Class SnippetEntry
java.lang.Object
org.mpisws.p2p.transport.peerreview.audit.SnippetEntry
public class SnippetEntry
- extends Object
--entry begin-- // 1 or more of these entries follow
char type
char sizeCode // 0=hashed, 1-FD=size, FE=32-bit size follows, FF=16-bit size follows
{short/int size}
char content[]
char nextSeqCode // 0=+1, 1=(idx=0,us+=1), 2=(idx=0,us+=2), ..., FF=full seq [does not exist for the last one]
{long long seq}
--entry end--
- Author:
- Jeff Hoye
type
public byte type
seq
public long seq
isHash
public boolean isHash
content
public byte[] content
NUM_INDEXES
public static final int NUM_INDEXES
- See Also:
- Constant Field Values
SnippetEntry
public SnippetEntry(byte type,
long seq,
boolean isHash,
byte[] content)
SnippetEntry
public SnippetEntry(InputBuffer buf,
int hashSize,
SnippetEntry prev)
throws IOException
- Throws:
IOException
SnippetEntry
public SnippetEntry(InputBuffer buf,
long seq,
int hashSize)
throws IOException
- Throws:
IOException
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
serialize
public void serialize(OutputBuffer buf,
SnippetEntry prev)
throws IOException
- Throws:
IOException
decodeSeq
protected static long decodeSeq(InputBuffer buf,
long prevSeq)
throws IOException
- Throws:
IOException
encodeSeq
protected void encodeSeq(OutputBuffer buf,
long prevSeq)
throws IOException
- Throws:
IOException
getSizeCode
public byte getSizeCode()
encodeSize
public void encodeSize(OutputBuffer buf)
throws IOException
- Throws:
IOException
decodeSize
public int decodeSize(InputBuffer buf)
throws IOException
- Throws:
IOException
Copyright © 2010. All Rights Reserved.