org.brains2b.coffee.decode
Interface Decoder

All Known Implementing Classes:
Base64Decoder, MimeDecoder, UUDecoder, YencDecoder

public interface Decoder

Interface to define a Decoder as obtained by the DecoderFactory on the basis of the Article supplied

Due to the difference in implementation of the Decoders the actual decoding is done either when a piece is added or on a call to getFileMessage()

Version:
1.0 25-08-2005
Author:
dennis@brains2b.nl
See Also:
DecoderFactory

Method Summary
 void decodePiece(java.lang.String s)
          hand a piece of coded characters to the Decoder
 FileMessage getFileMessage()
          get the FileMessage with a reference to the decoded bytes
 

Method Detail

decodePiece

void decodePiece(java.lang.String s)
                 throws java.lang.Exception
hand a piece of coded characters to the Decoder

Parameters:
s - String, a piece or the complete encoded characters to decode
Throws:
Exception, - thrown if the Piece cannot be added for decoding
java.lang.Exception
See Also:
getFileMessage()

getFileMessage

FileMessage getFileMessage()
                           throws java.lang.Exception
get the FileMessage with a reference to the decoded bytes

Returns:
FileMessage the reference to the decoded bytes and possible file information
Throws:
Exception, - thrown if the decoder cannot decode the file or FileMessage cannot be created
java.lang.Exception