--- /home/tromey/gnu/Nightly/classpath/classpath/gnu/java/io/Base64InputStream.java 2004-11-08 02:18:56.000000000 -0700 +++ gnu/java/io/Base64InputStream.java 2004-05-04 02:18:21.000000000 -0600 @@ -1,5 +1,5 @@ /* Base64InputStream.java -- base-64 input stream. - Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -38,8 +38,6 @@ package gnu.java.io; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; @@ -92,30 +90,6 @@ eof = false; } - // Class method. - // ------------------------------------------------------------------------ - - /** - * Decode a single Base-64 string to a byte array. - * - * @param base64 The Base-64 encoded data. - * @return The decoded bytes. - * @throws IOException If the given data do not compose a valid Base-64 - * sequence. - */ - public static byte[] decode(String base64) throws IOException - { - Base64InputStream in = - new Base64InputStream(new ByteArrayInputStream(base64.getBytes())); - ByteArrayOutputStream out = - new ByteArrayOutputStream((int) (base64.length() / 0.666)); - byte[] buf = new byte[1024]; - int len; - while ((len = in.read(buf)) != -1) - out.write(buf, 0, len); - return out.toByteArray(); - } - // Instance methods. // ------------------------------------------------------------------------