    View Javadoc
    1   /*
    2    * Copyright (c) 2003
    3    * Information Desire GmbH
    4    * All rights reserved.
    5    */
    6   package com.infodesire.infobit.external.impl;
    7
    8   import java.io.IOException;
    9   import java.io.OutputStream;
    10
    11  /***
    12   * This interface describes decoding of a textual representation of binary data.
    13   *
    14   * @author    peter2
    15   * @created   1. September 2003
    16   * @version   $Revision: 1.1 $
    17   */
    18  interface Decoder {
    19
    20      /***
    21       * Defines the destination
    22       *
    23       * @param dest  Where to put the decoded data to
    24       */
    25      void setDestination(OutputStream dest);
    26
    27
    28      /***
    29       * Defines the number of bytes to process. To be set before processing
    30       * starts.
    31       *
    32       * @param contentLength  The new ContentLength value
    33       */
    34      public void setContentLength(int contentLength);
    35
    36
    37      /***
    38       * Queries the number of already decoded bytes.
    39       *
    40       * @return   The WrittenLength value
    41       */
    42      public int getWrittenLength();
    43
    44
    45      /***
    46       * Tests whether the input cannot be decoded.
    47       *
    48       * @return   Description of the Returned Value
    49       */
    50      public boolean hasError();
    51
    52
    53      /***
    54       * Gets a short error description.
    55       *
    56       * @return   The ErrorText value
    57       */
    58      public String getErrorText();
    59
    60
    61      /***
    62       * Adds the specified chunk to the text to be decoded.
    63       *
    64       * @param offset           Index of the first byte of the chunk in <code>b</code>
    65       * @param length           Lenght of the chunk
    66       * @param b                Description of Parameter
    67       * @exception IOException  Description of Exception
    68       * @pram                   b Holds the chunk to be decoded
    69       */
    70      void decodeChunk(char[] b, int offset, int length) throws IOException;
    71
    72
    73      /***
    74       * Signals the end of the input stream of characters to be decoded.
    75       *
    76       * @exception IOException  Description of Exception
    77       */
    78      void endOfData() throws IOException;
    79
    80  }

This page was automatically generated by Maven