org.mpisws.p2p.transport.peerreview.audit
Class SnippetEntry
java.lang.Object
org.mpisws.p2p.transport.peerreview.audit.SnippetEntry
public class SnippetEntry
- extends java.lang.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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 java.io.IOException
- Throws:
java.io.IOException
SnippetEntry
public SnippetEntry(InputBuffer buf,
long seq,
int hashSize)
throws java.io.IOException
- Throws:
java.io.IOException
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
serialize
public void serialize(OutputBuffer buf,
SnippetEntry prev)
throws java.io.IOException
- Throws:
java.io.IOException
decodeSeq
protected static long decodeSeq(InputBuffer buf,
long prevSeq)
throws java.io.IOException
- Throws:
java.io.IOException
encodeSeq
protected void encodeSeq(OutputBuffer buf,
long prevSeq)
throws java.io.IOException
- Throws:
java.io.IOException
getSizeCode
public byte getSizeCode()
encodeSize
public void encodeSize(OutputBuffer buf)
throws java.io.IOException
- Throws:
java.io.IOException
decodeSize
public int decodeSize(InputBuffer buf)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2001-2005 - Rice Pastry.