Examples of unread()


Examples of java.io.PushbackReader.unread()

                                return new OrderedJSONObject(rdr, strict);
                            } else {
                                return new JSONObject(rdr,strict);
                            }
                        case '[':
                            pReader.unread(ch);
                            if (bufferIt) {
                                rdr = new BufferedReader(pReader);
                            }
                            return new JSONArray(rdr, strict);
                        case ' ':
View Full Code Here

Examples of java.io.PushbackReader.unread()

                retval.add(sb.toString());
                continue;
            }

            if(ch == '(') { // more attrs defined
                reader.unread(ch);
                String attrs=readUntil(reader, ')');
                sb.append(attrs);
                retval.add(sb.toString());
            }
            else {
View Full Code Here

Examples of org.apache.abdera.i18n.text.io.DynamicPushbackInputStream.unread()

    @Test
    public void testDynamicPushbackInputStream() throws Exception {
        ByteArrayInputStream in = new ByteArrayInputStream(new byte[] {0x01, 0x02, 0x03, 0x04});
        DynamicPushbackInputStream dpis = new DynamicPushbackInputStream(in);
        int r = dpis.read();
        dpis.unread(r);
        int e = dpis.read();
        assertEquals(r, e);
        dpis.unread(e);
        dpis.clear();
        r = dpis.read();
View Full Code Here

Examples of org.apache.james.mime4j.io.LineReaderInputStream.unread()

                monitor(Event.INVALID_HEADER);
                if (config.isMalformedHeaderStartsBody()) {
                    LineReaderInputStream instream = getDataStream();
                    ByteArrayBuffer buf = fieldBuilder.getRaw();
                    // Complain, if raw data is not available or cannot be 'unread'
                    if (buf == null || !instream.unread(buf)) {
                        throw new MimeParseEventException(Event.INVALID_HEADER);
                    }
                    return false;
                }
            }
View Full Code Here

Examples of org.freeplane.n3.nanoxml.IXMLReader.unread()

              throw new XMLParseException(reader.getSystemID(), reader.getLineNr(), "Invalid input: />");
            }
          }
          else if (ch == '<') {
            waitingBuf.append('/');
            reader.unread(ch);
            continue;
          }
          waitingBuf.append('/');
        }
        waitingBuf.append(ch);
View Full Code Here

Examples of org.jruby.util.io.OpenFile.unread()

                //                rb_thread_io_blocking_region(nogvl_fsync, fptr, fptr->fd);
                //            }
                //            #endif
            }
            if ((fptr.getMode() & OpenFile.READABLE) != 0) {
                fptr.unread(context);
            }
        } finally {
            if (locked) fptr.unlock();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.