gnu.crypto.assembly

Class LoopbackTransformer


(package private) 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.1 $

Field Summary

Fields inherited from class gnu.crypto.assembly.Transformer

DIRECTION, inBuffer, mode, outBuffer, tail, wired

Constructor Summary

LoopbackTransformer()
Trivial protected constructor.

Method Summary

(package private) int
delegateBlockSize()
void
init(Map attributes)
Initialises the Transformer for operation with specific characteristics.
(package private) void
initDelegate(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, delegateBlockSize, getCascadeTransformer, getDeflateTransformer, getPaddingTransformer, init, initDelegate, isPostProcessing, isPreProcessing, lastUpdate, lastUpdate, lastUpdate, lastUpdate, lastUpdateDelegate, reset, resetDelegate, setMode, update, update, update, updateDelegate

Constructor Details

LoopbackTransformer

(package private)  LoopbackTransformer()
Trivial protected constructor.

Method Details

delegateBlockSize

(package private)  int delegateBlockSize()
Overrides:
delegateBlockSize in interface Transformer


init

public void init(Map attributes)
            throws TransformerException
Initialises the Transformer for operation with specific characteristics.
Overrides:
init in interface Transformer

Parameters:
attributes - a set of name-value pairs that describes the desired future behaviour of this instance.


initDelegate

(package private)  void initDelegate(Map attributes)
            throws TransformerException
Overrides:
initDelegate in interface Transformer


lastUpdate

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

Returns:
the result of transformation.

Throws:
TransformerException - if a transformation-related exception occurs during the operation.

See Also:
Transformer.lastUpdate(byte[],int,int)


lastUpdateDelegate

(package private)  byte[] lastUpdateDelegate()
            throws TransformerException
Overrides:
lastUpdateDelegate in interface Transformer


reset

public void reset()
Resets the Transformer for re-initialisation and use with other characteristics. This method always succeeds.
Overrides:
reset in interface Transformer


resetDelegate

(package private)  void resetDelegate()
Overrides:
resetDelegate in interface Transformer


update

public byte[] update(byte[] in,
                     int offset,
                     int length)
            throws TransformerException
Processes a designated number of bytes from a given byte array.
Overrides:
update in interface 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.


updateDelegate

(package private)  byte[] updateDelegate(byte[] in,
                                         int offset,
                                         int length)
            throws TransformerException
Overrides:
updateDelegate in interface Transformer


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