< prev index next >

test/sun/misc/Encode/DecodeBuffer.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4159554
  27  * @summary Problem with UUDecoder
  28  *
  29  */
  30 
  31 import sun.misc.*;
  32 import java.io.*;
  33 
  34 public class DecodeBuffer {
  35 
  36     public static void main(String[] args) throws Exception {
  37         String encoded;
  38         // text to encode and decode
  39         String originalText = "Hi There, please encode and decode me";
  40         UUDecoder uuD = new UUDecoder();
  41 
  42         encoded = "begin 644 encoder.buf\r\n" +
  43           "E2&D@5&AE<F4L('!L96%S92!E;F-O9&4@86YD(&1E8V]D92!M90$!\r\n"+
  44           " \r\nend\r\n";
  45         check (uuD, encoded, originalText);
  46 
  47         encoded = "begin 644 encoder.buf\n" +
  48           "E2&D@5&AE<F4L('!L96%S92!E;F-O9&4@86YD(&1E8V]D92!M90$!\n"+




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4159554
  27  * @summary Problem with UUDecoder
  28  * @modules java.base/sun.misc
  29  */
  30 
  31 import sun.misc.*;
  32 import java.io.*;
  33 
  34 public class DecodeBuffer {
  35 
  36     public static void main(String[] args) throws Exception {
  37         String encoded;
  38         // text to encode and decode
  39         String originalText = "Hi There, please encode and decode me";
  40         UUDecoder uuD = new UUDecoder();
  41 
  42         encoded = "begin 644 encoder.buf\r\n" +
  43           "E2&D@5&AE<F4L('!L96%S92!E;F-O9&4@86YD(&1E8V]D92!M90$!\r\n"+
  44           " \r\nend\r\n";
  45         check (uuD, encoded, originalText);
  46 
  47         encoded = "begin 644 encoder.buf\n" +
  48           "E2&D@5&AE<F4L('!L96%S92!E;F-O9&4@86YD(&1E8V]D92!M90$!\n"+


< prev index next >