org.prevayler.foundation.serialization
Class DESSerializer

java.lang.Object
  extended by org.prevayler.foundation.serialization.DESSerializer
All Implemented Interfaces:
Serializer

public class DESSerializer
extends Object
implements Serializer


Constructor Summary
DESSerializer(Serializer delegate, byte[] key)
           
 
Method Summary
 Object readObject(InputStream stream)
          Read an object from a stream.
 void writeObject(OutputStream stream, Object object)
          Write an object to a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DESSerializer

public DESSerializer(Serializer delegate,
                     byte[] key)
              throws GeneralSecurityException
Parameters:
key - An 8-byte DES key or a 24-byte 3DES key.
Throws:
GeneralSecurityException
Method Detail

writeObject

public void writeObject(OutputStream stream,
                        Object object)
                 throws Exception
Description copied from interface: Serializer
Write an object to a stream. An implementation must ensure that the object is written completely before returning. An implementation is free to flush or close the given stream as it sees fit, but is not required to do either. An implementation can expect that the stream is already buffered, so additional buffering is not required for performance.

Specified by:
writeObject in interface Serializer
Throws:
Exception

readObject

public Object readObject(InputStream stream)
                  throws Exception
Description copied from interface: Serializer
Read an object from a stream. An implementation is free to close the given stream as it sees fit, but is not required to do so. An implementation can expect that the stream is already buffered, so additional buffering is not required for performance.

Specified by:
readObject in interface Serializer
Throws:
Exception


Copyright © 2001-2013. All Rights Reserved.