com.limegroup.gnutella.dime
Class AsyncDimeParser
java.lang.Object
org.limewire.nio.statemachine.ReadState
com.limegroup.gnutella.dime.AsyncDimeParser
- All Implemented Interfaces:
- IOState
public class AsyncDimeParser
- extends ReadState
Parser for creating DIMERecords from non-blocking input.
See: http://www.gotdotnet.com/team/xml_wsspecs/dime/dime.htm
(or http://www.perfectxml.com/DIME.asp )
for information about DIME.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncDimeParser
public AsyncDimeParser()
processRead
protected boolean processRead(ReadableByteChannel channel,
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
getRecords
public List<DIMERecord> getRecords()
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.