For the latest news and information visit
The GNU Crypto project

gnu.crypto.assembly
Class LoopbackTransformer

java.lang.Object
  extended bygnu.crypto.assembly.Transformer
      extended bygnu.crypto.assembly.LoopbackTransformer

final class LoopbackTransformer
extends Transformer

A trivial Transformer to allow closing a chain in an Assembly. This class is not visible outside this package.

Version:
$Revision: 1.2 $

Field Summary
 
Fields inherited from class gnu.crypto.assembly.Transformer
DIRECTION, inBuffer, mode, outBuffer, tail, wired
 
Constructor Summary
(package private) LoopbackTransformer()
          Trivial protected constructor.
 
Method Summary
(package private)  int delegateBlockSize()
           
 void init(java.util.Map attributes)
          Initialises the Transformer for operation with specific characteristics.
(package private)  void initDelegate(java.util.Map attributes)
           
 byte[] lastUpdate()
          Convenience method that calls the same method with three arguments.
(package private)  byte[] lastUpdateDelegate()
           
 void reset()
          Resets the Transformer for re-initialisation and use with other characteristics.
(package private)  void resetDelegate()
           
 byte[] update(byte[] in, int offset, int length)
          Processes a designated number of bytes from a given byte array.
(package private)  byte[] updateDelegate(byte[] in, int offset, int length)
           
 
Methods inherited from class gnu.crypto.assembly.Transformer
currentBlockSize, getCascadeTransformer, getDeflateTransformer, getPaddingTransformer, isPostProcessing, isPreProcessing, lastUpdate, lastUpdate, lastUpdate, setMode, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopbackTransformer

LoopbackTransformer()
Trivial protected constructor.

Method Detail

init

public void init(java.util.Map attributes)
          throws TransformerException
Description copied from class: Transformer
Initialises the Transformer for operation with specific characteristics.

Overrides:
init in class Transformer
Parameters:
attributes - a set of name-value pairs that describes the desired future behaviour of this instance.
Throws:
TransformerException

reset

public void reset()
Description copied from class: Transformer
Resets the Transformer for re-initialisation and use with other characteristics. This method always succeeds.

Overrides:
reset in class Transformer

update

public byte[] update(byte[] in,
                     int offset,
                     int length)
              throws TransformerException
Description copied from class: Transformer
Processes a designated number of bytes from a given byte array.

Overrides:
update in class Transformer
Parameters:
in - the input data bytes.
offset - index of in from which to start considering data.
length - the count of bytes to process.
Returns:
the result of transformation.
Throws:
TransformerException - if a transformation-related exception occurs during the operation.

lastUpdate

public byte[] lastUpdate()
                  throws TransformerException
Description copied from class: Transformer
Convenience method that calls the same method with three arguments. A zero-long byte array is used.

Overrides:
lastUpdate in class Transformer
Returns:
the result of transformation.
Throws:
TransformerException - if a transformation-related exception occurs during the operation.
See Also:
Transformer.lastUpdate(byte[], int, int)

initDelegate

void initDelegate(java.util.Map attributes)
            throws TransformerException
Specified by:
initDelegate in class Transformer
Throws:
TransformerException

delegateBlockSize

int delegateBlockSize()
Specified by:
delegateBlockSize in class Transformer

resetDelegate

void resetDelegate()
Specified by:
resetDelegate in class Transformer

updateDelegate

byte[] updateDelegate(byte[] in,
                      int offset,
                      int length)
                throws TransformerException
Specified by:
updateDelegate in class Transformer
Throws:
TransformerException

lastUpdateDelegate

byte[] lastUpdateDelegate()
                    throws TransformerException
Specified by:
lastUpdateDelegate in class Transformer
Throws:
TransformerException

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.