com.limegroup.gnutella.dime
Class AsyncDimeRecordReader
java.lang.Object
org.limewire.nio.statemachine.ReadState
com.limegroup.gnutella.dime.AsyncDimeRecordReader
- All Implemented Interfaces:
- IOState
public class AsyncDimeRecordReader
- extends ReadState
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncDimeRecordReader
public AsyncDimeRecordReader()
getRecord
public DIMERecord getRecord()
throws DIMEException
- Returns the next record if it can be constructed or null if it isn't
processed yet.
- Returns:
-
- Throws:
IOException
DIMEException
processRead
protected boolean processRead(ReadableByteChannel rc,
ByteBuffer buffer)
throws IOException
- Description copied from class:
ReadState
- Reads data from the channel into the buffer. If this returns true, the state requires further processing.
This should be called repeatedly until it returns false, at which point the next state should
be used.
- Specified by:
processRead in class ReadState
- Throws:
IOException
getAmountProcessed
public long getAmountProcessed()
- Description copied from interface:
IOState
- Returns the amount of data that has been processed by this
IOState.
This operation is optional; it should return -1 if unsupported.
- Returns:
Copyright © 2009. All Rights Reserved.