Package org.jnode.util

Examples of org.jnode.util.ReaderInputStream


    @Test
    public void testBadUnicode4() throws Exception {
        char[] chars = new char[] {'\ud800'};
        final String LINE = new String(chars);
        Reader r = new OneCharAtATimeReader(new StringReader(LINE));
        ReaderInputStream ris = new ReaderInputStream(r, "UTF-8");
        InputStreamReader isr = new InputStreamReader(ris);
        try {
            isr.read();
            Assert.fail("No exception raised");
        } catch (MalformedInputException ex) {
View Full Code Here


    @Test
    public void testBadUnicode5() throws Exception {
        char[] chars = new char[] {'a', '\ud800'};
        final String LINE = new String(chars);
        Reader r = new OneCharAtATimeReader(new StringReader(LINE));
        ReaderInputStream ris = new ReaderInputStream(r, "UTF-8");
        InputStreamReader isr = new InputStreamReader(ris);
        Assert.assertEquals(chars[0], isr.read());
        try {
            isr.read();
            Assert.fail("No exception raised");
View Full Code Here

    @Test
    public void testBadUnicode6() throws Exception {
        char[] chars = new char[] {'\udc00'};
        final String LINE = new String(chars);
        Reader r = new OneCharAtATimeReader(new StringReader(LINE));
        ReaderInputStream ris = new ReaderInputStream(r, "UTF-8");
        InputStreamReader isr = new InputStreamReader(ris);
        try {
            isr.read();
            Assert.fail("No exception raised");
        } catch (MalformedInputException ex) {
View Full Code Here

            if (in == null) {
                throw new ShellException("console input stream is null");
            }
            setupStreams(new ShellConsoleReader(in), new ShellConsoleWriter(out),
                    new ShellConsoleWriter(err));
            SystemInputStream.getInstance().initialize(new ReaderInputStream(in));
            cons.setCompleter(this);

            console.addConsoleListener(this);
            aliasMgr = ShellUtils.getAliasManager().createAliasManager();
            syntaxMgr = ShellUtils.getSyntaxManager().createSyntaxManager();
View Full Code Here

TOP

Related Classes of org.jnode.util.ReaderInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.