Don't you take a risk when using sun.misc.*

Sun states:

"The sun.* packages are not part of the supported, public Java interface.
A Java program that directly calls any API in sun.* packages is not
guaranteed to work on all Java-compatible platforms. In fact, such a program
is not guaranteed to work even in future versions on the same platform."

-----Original Message-----
From: Laszlo Nadai [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 05, 2000 3:17 PM
To: [EMAIL PROTECTED]
Subject: Re: Base64 Encoding


import sun.misc.*;
import java.awt.*;
import java.io.*;

public class Base64Encode {

  public static void main(String[] args) {

    if (args.length > 0) {
      for (int i = 0; i < args.length; i++) {
        try {
          InputStream is = new FileInputStream(args[i]);
          OutputStream os = new FileOutputStream(args[i] + ".64");
          BASE64Encoder b64ec = new BASE64Encoder();
          b64ec.encodeBuffer(is, os);
        }
        catch (IOException e) {
          System.err.println(e);
        }
      }  // end for
    } // end if

  }  // end main

}


laszlo

> Adam Weigert wrote:
>
> How can I do it... I have the decoding process but I need the
> encoding...
>
> regards,
> Adam

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to