Package java.io

Examples of java.io.BufferedReader.mark()


        } else {
            Reader reader = message.getContent(Reader.class);
            if (reader != null) {
                try {
                    BufferedReader r = new BufferedReader(reader, limit);
                    r.mark(limit);
                    char b[] = new char[limit];
                    int i = r.read(b);
                    buffer.getPayload().append(b, 0, i);
                    r.reset();
                    message.setContent(Reader.class, r);
View Full Code Here


    public void checkValid(CharSequence literal) throws DatatypeException {
        try {
            Reader reader = new BufferedReader((new StringReader(
                    "function(event){" + literal.toString() + "}")));
            reader.mark(1);
            try {
                Context context = ContextFactory.getGlobal().enterContext();
                context.setOptimizationLevel(0);
                context.setLanguageVersion(Context.VERSION_1_6);
                // -1 for lineno arg prevents Rhino from appending
View Full Code Here

                    iri = null; // Don't bother user with generic IRI syntax
                    Reader reader = new BufferedReader(
                            new Utf8PercentDecodingReader(new StringReader(
                                    "function(event){" + tail.toString() + "}")));
                    // XXX CharSequenceReader
                    reader.mark(1);
                    int c = reader.read();
                    if (c != 0xFEFF) {
                        reader.reset();
                    }
                    try {
View Full Code Here

        } else {
            Reader reader = message.getContent(Reader.class);
            if (reader != null) {
                try {
                    BufferedReader r = new BufferedReader(reader, limit);
                    r.mark(limit);
                    char b[] = new char[limit];
                    int i = r.read(b);
                    buffer.getPayload().append(b, 0, i);
                    r.reset();
                    message.setContent(Reader.class, r);
View Full Code Here

        LinkedHashMap<String, LinkedHashMap<String,String>> theString = new LinkedHashMap<>();
        while ((in = reader.readLine())!=null){
            tempLine = in.split(separator);
            LinkedHashMap<String, String> theStringMap = new LinkedHashMap<>();
            theStringMap.put(tempLine[1], tempLine[2]);
            reader.mark(3000);
            while (((in = reader.readLine()) != null)&&(in.contains(tempLine[0]))){
                tempLine = in.split(separator);
                theStringMap.put(tempLine[1], tempLine[2]);
                reader.mark(3000);
            }
View Full Code Here

            theStringMap.put(tempLine[1], tempLine[2]);
            reader.mark(3000);
            while (((in = reader.readLine()) != null)&&(in.contains(tempLine[0]))){
                tempLine = in.split(separator);
                theStringMap.put(tempLine[1], tempLine[2]);
                reader.mark(3000);
            }
            reader.reset();
            theString.put(tempLine[0], theStringMap);
        }
        File outputFile = new File ("E:\\Dropbox\\Lab Study\\DNP_VALUE_NUMERIC_out.txt");
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.