Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`byte[]` | `content`
`boolean` | `isHash`
`static int` | `NUM_INDEXES`
`long` | `seq`
`byte` | `type`

Constructor Summary
`SnippetEntry(byte type, long seq, boolean isHash, byte[] content)`
`SnippetEntry(InputBuffer buf, int hashSize, SnippetEntry prev)`
`SnippetEntry(InputBuffer buf, long seq, int hashSize)`

Method Summary
`protected static long` | `decodeSeq(InputBuffer buf, long prevSeq)`
`int` | `decodeSize(InputBuffer buf)`
`protected void` | `encodeSeq(OutputBuffer buf, long prevSeq)`
`void` | `encodeSize(OutputBuffer buf)`
`boolean` | `equals(java.lang.Object o)`
`byte` | `getSizeCode()`
`void` | `serialize(OutputBuffer buf, SnippetEntry prev)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### 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`

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.