net.tomp2p.message
Class DataCodec

java.lang.Object
  extended by net.tomp2p.message.DataCodec

public class DataCodec
extends Object

Encoder and decoder for Data.

Author:
Thomas Bocek

Constructor Summary
DataCodec()
           
 
Method Summary
static Data createData(ByteBuffer[] byteBuffers, int length, int ttl, boolean protectedEntry, boolean fileReference, PeerAddress originator)
           
static Data decodeData(org.jboss.netty.buffer.ChannelBuffer buffer, PeerAddress originator)
           
static int encodeData(ProtocolChunked input, Data data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCodec

public DataCodec()
Method Detail

encodeData

public static int encodeData(ProtocolChunked input,
                             Data data)
                      throws ClassNotFoundException,
                             IOException
Throws:
ClassNotFoundException
IOException

decodeData

public static Data decodeData(org.jboss.netty.buffer.ChannelBuffer buffer,
                              PeerAddress originator)
                       throws InvalidKeyException,
                              NoSuchAlgorithmException,
                              InvalidKeySpecException
Throws:
InvalidKeyException
NoSuchAlgorithmException
InvalidKeySpecException

createData

public static Data createData(ByteBuffer[] byteBuffers,
                              int length,
                              int ttl,
                              boolean protectedEntry,
                              boolean fileReference,
                              PeerAddress originator)


Copyright © 2013. All Rights Reserved.