CryptoPro JCP v 1.0.
Public API.

ru.CryptoPro.JCP.tools
Class Decoder

java.lang.Object
  extended byru.CryptoPro.JCP.tools.Decoder

public class Decoder
extends java.lang.Object

This class defines the decoding half of character encoders and user for decode the cetrification request. A character decoder is an algorithim for transforming 8 bit binary data that has been encoded into text by a character encoder, back into original binary form. The character encoders, in general, have been structured around a central theme that binary data can be encoded into text that has the form: [Buffer Prefix] [Line Prefix][encoded data atoms][Line Suffix] [Buffer Suffix] Of course in the simplest encoding schemes, the buffer has no distinct prefix of suffix, however all have some fixed relationship between the text in an 'atom' and the binary data itself.

Author:
Copyright 2004-2005 Crypto-Pro. All rights reserved.
Version:1.0

Constructor Summary
Decoder()
           
 
Method Summary
 byte[] decodeBuffer(java.io.InputStream in)
          Decode the contents of the inputstream into a buffer.
 void decodeBuffer(java.io.InputStream aStream, java.io.OutputStream bStream)
          Decode the text from the InputStream and write the decoded octets to the OutputStream.
 byte[] decodeBuffer(java.lang.String inputString)
          Alternate decode interface that takes a String containing the encoded buffer and returns a byte array containing the data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Decoder

public Decoder()
Method Detail

decodeBuffer

public void decodeBuffer(java.io.InputStream aStream,
                         java.io.OutputStream bStream)
                  throws java.io.IOException
Decode the text from the InputStream and write the decoded octets to the OutputStream. This method runs until the stream is exhausted.

Throws:
java.io.IOException

decodeBuffer

public byte[] decodeBuffer(java.lang.String inputString)
                    throws java.io.IOException
Alternate decode interface that takes a String containing the encoded buffer and returns a byte array containing the data.

Throws:
sun.misc.CEFormatException - An error has occured while decoding
java.io.IOException

decodeBuffer

public byte[] decodeBuffer(java.io.InputStream in)
                    throws java.io.IOException
Decode the contents of the inputstream into a buffer.

Throws:
java.io.IOException

Copyright Crypto-Pro.
All rights reserved.