/[classpath]/classpath/gnu/java/io/decode/Decoder.java
ViewVC logotype

Diff of /classpath/gnu/java/io/decode/Decoder.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by robilad, Sun Jul 25 17:04:17 2004 UTC revision 1.7.2.1 by gnu_andrew, Sun Jan 16 02:14:45 2005 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package gnu.java.io.decode;  package gnu.java.io.decode;
40    
 import java.io.CharConversionException;  
41  import java.io.IOException;  import java.io.IOException;
42  import java.io.InputStream;  import java.io.InputStream;
43  import java.io.Reader;  import java.io.Reader;
# Line 124  getSchemeName() Line 123  getSchemeName()
123    *    *
124    * @return The number of characters than can be decoded from the byte array    * @return The number of characters than can be decoded from the byte array
125    *    *
   * @exception CharConversionException If the bytes do not evenly translate to characters, or an invalid byte is encountered.  
126    */    */
127  public int  public int
128  charsInByteArray(byte[] buf) throws CharConversionException  charsInByteArray(byte[] buf)
129  {  {
130    return(charsInByteArray(buf, 0, buf.length));    return(charsInByteArray(buf, 0, buf.length));
131  }  }
# Line 148  charsInByteArray(byte[] buf) throws Char Line 146  charsInByteArray(byte[] buf) throws Char
146    *    *
147    * @return The number of characters than can be decoded from the byte array    * @return The number of characters than can be decoded from the byte array
148    *    *
   * @exception CharConversionException If the bytes do not evenly translate to characters, or an invalid byte is encountered.  
149    */    */
150  public abstract int  public abstract int
151  charsInByteArray(byte[] buf, int offset, int len) throws CharConversionException;  charsInByteArray(byte[] buf, int offset, int len);
152    
153  /*************************************************************************/  /*************************************************************************/
154    
# Line 163  charsInByteArray(byte[] buf, int offset, Line 160  charsInByteArray(byte[] buf, int offset,
160    *    *
161    * @return The converted char array    * @return The converted char array
162    *    *
   * @exception CharConversionException If an error occurs, such as an invalid byte in the source array.  
163    */    */
164  public char[]  public char[]
165  convertToChars(byte[] buf) throws CharConversionException  convertToChars(byte[] buf)
166  {  {
167    return(convertToChars(buf, 0, buf.length));    return(convertToChars(buf, 0, buf.length));
168  }  }
# Line 184  convertToChars(byte[] buf) throws CharCo Line 180  convertToChars(byte[] buf) throws CharCo
180    *    *
181    * @return The converted char array    * @return The converted char array
182    *    *
   * @exception CharConversionException If an error occurs, such as an invalid byte in the source array.  
183    */    */
184  public char[]  public char[]
185  convertToChars(byte[] buf, int offset, int len) throws CharConversionException  convertToChars(byte[] buf, int offset, int len)
186  {  {
187    char[] cbuf = new char[charsInByteArray(buf, offset, len)];    char[] cbuf = new char[charsInByteArray(buf, offset, len)];
188    
# Line 212  convertToChars(byte[] buf, int offset, i Line 207  convertToChars(byte[] buf, int offset, i
207    * @return The char array passed by the caller as a param, now filled with converted characters.    * @return The char array passed by the caller as a param, now filled with converted characters.
208    *    *
209    * @exception ArrayIndexOutOfBoundsException If the destination char array is not big enough to hold all the converted characters    * @exception ArrayIndexOutOfBoundsException If the destination char array is not big enough to hold all the converted characters
   * @exception CharConversionException If an error occurs, such as an invalid byte in the source array.  
210    */    */
211  public char[]  public char[]
212  convertToChars(byte[] buf, char[] cbuf, int cbuf_offset) throws  convertToChars(byte[] buf, char[] cbuf, int cbuf_offset)
                   CharConversionException  
213  {  {
214    return(convertToChars(buf, 0, buf.length, cbuf, cbuf_offset));    return(convertToChars(buf, 0, buf.length, cbuf, cbuf_offset));
215  }  }
# Line 242  convertToChars(byte[] buf, char[] cbuf, Line 235  convertToChars(byte[] buf, char[] cbuf,
235    * @return The char array passed by the caller as a param, now filled with converted characters.    * @return The char array passed by the caller as a param, now filled with converted characters.
236    *    *
237    * @exception ArrayIndexOutOfBoundsException If the destination char array is not big enough to hold all the converted characters    * @exception ArrayIndexOutOfBoundsException If the destination char array is not big enough to hold all the converted characters
   * @exception CharConversionException If an error occurs, such as an invalid byte in the source array.  
238    */    */
239  public abstract char[]  public abstract char[]
240  convertToChars(byte[] buf, int buf_offset, int len, char[] cbuf,  convertToChars(byte[] buf, int buf_offset, int len, char[] cbuf,
241                 int cbuf_offset) throws CharConversionException;                 int cbuf_offset);
242    
243  /*************************************************************************/  /*************************************************************************/
244    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26