com.limegroup.gnutella.dime
Class AsyncDimeWriter
java.lang.Object
org.limewire.nio.statemachine.WriteState
com.limegroup.gnutella.dime.AsyncDimeWriter
- All Implemented Interfaces:
- IOState
public class AsyncDimeWriter
- extends WriteState
Uses NIO to write a list of DIMERecord objects to a channel. Based on
MessageWriter.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isFirstRecord
public boolean isFirstRecord
AsyncDimeWriter
public AsyncDimeWriter(List<DIMERecord> records)
processWrite
protected boolean processWrite(WritableByteChannel channel,
ByteBuffer buffer)
throws IOException
- Specified by:
processWrite in class WriteState
- 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.