net.tomp2p.message
Class ProtocolChunkedInput

java.lang.Object
  extended by net.tomp2p.message.ProtocolChunkedInput
All Implemented Interfaces:
ProtocolChunked, org.jboss.netty.handler.stream.ChunkedInput

public class ProtocolChunkedInput
extends Object
implements org.jboss.netty.handler.stream.ChunkedInput, ProtocolChunked


Constructor Summary
ProtocolChunkedInput(org.jboss.netty.channel.ChannelHandlerContext ctx, PrivateKey privateKey)
           
 
Method Summary
 void addMarkerForSignature()
           
 void close()
           
 void copyToCurrent(byte size)
           
 void copyToCurrent(byte[] byteArray)
           
 void copyToCurrent(byte[] array, int offset, int length)
           
 void copyToCurrent(org.jboss.netty.buffer.ChannelBuffer slice)
           
 void copyToCurrent(int size)
           
 void copyToCurrent(long long1)
           
 void copyToCurrent(short short1)
           
 void flush(boolean last)
           
 boolean hasNextChunk()
           
 boolean isEndOfInput()
           
 Object nextChunk()
           
 void resume()
           
 int size()
           
 void transferToCurrent(FileChannel inChannel, long length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolChunkedInput

public ProtocolChunkedInput(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            PrivateKey privateKey)
                     throws NoSuchAlgorithmException,
                            InvalidKeyException
Throws:
NoSuchAlgorithmException
InvalidKeyException
Method Detail

hasNextChunk

public boolean hasNextChunk()
                     throws Exception
Specified by:
hasNextChunk in interface org.jboss.netty.handler.stream.ChunkedInput
Throws:
Exception

nextChunk

public Object nextChunk()
                 throws Exception
Specified by:
nextChunk in interface org.jboss.netty.handler.stream.ChunkedInput
Throws:
Exception

size

public int size()

addMarkerForSignature

public void addMarkerForSignature()

isEndOfInput

public boolean isEndOfInput()
                     throws Exception
Specified by:
isEndOfInput in interface org.jboss.netty.handler.stream.ChunkedInput
Throws:
Exception

close

public void close()
           throws Exception
Specified by:
close in interface org.jboss.netty.handler.stream.ChunkedInput
Throws:
Exception

resume

public void resume()

copyToCurrent

public void copyToCurrent(byte[] byteArray)
Specified by:
copyToCurrent in interface ProtocolChunked

copyToCurrent

public void copyToCurrent(int size)
Specified by:
copyToCurrent in interface ProtocolChunked

copyToCurrent

public void copyToCurrent(byte size)
Specified by:
copyToCurrent in interface ProtocolChunked

copyToCurrent

public void copyToCurrent(long long1)
Specified by:
copyToCurrent in interface ProtocolChunked

copyToCurrent

public void copyToCurrent(short short1)
Specified by:
copyToCurrent in interface ProtocolChunked

copyToCurrent

public void copyToCurrent(org.jboss.netty.buffer.ChannelBuffer slice)
Specified by:
copyToCurrent in interface ProtocolChunked

copyToCurrent

public void copyToCurrent(byte[] array,
                          int offset,
                          int length)
Specified by:
copyToCurrent in interface ProtocolChunked

flush

public void flush(boolean last)

transferToCurrent

public void transferToCurrent(FileChannel inChannel,
                              long length)
                       throws IOException
Specified by:
transferToCurrent in interface ProtocolChunked
Throws:
IOException


Copyright © 2013. All Rights Reserved.