Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4159554

Problem with UUDecoder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.1.5
    • core-libs
    • merlin
    • x86
    • windows_95



      Name: diC59631 Date: 07/22/98


      Hi

      The below code proceduces the following exception "sun.misc.CEFFormatException: UUDecoder: Missing 'end' line."

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

      public class UUTest {
         public static void main(String[] args) throws IOException {

      // text to encode and decode
            String originalText = "Hi There, please encode and decode me";
      // turn the string into a byte array
            byte[] originalBytes = originalText.getBytes();

      // create all the encoders and decoders for later use
            UUEncoder uuE = new UUEncoder();
            UUDecoder uuD = new UUDecoder();

            System.out.println("Orignl *" + originalText + "*");
            System.out.println("===========UU encoding Start================");

            // do UU stuff
            System.out.println();
            String uuEnc = uuE.encodeBuffer(originalBytes);
            System.out.println(uuEnc);
            System.out.println("===========UU encodeing Ends=================");

            // this will fail, Why?
            String uuDec = new String(uuD.decodeBuffer(uuEnc));
            System.out.println("Decode *" + uuDec + "*");
         }
      }
      (Review ID: 27260)
      ======================================================================

            michaelm Michael McMahon
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: