Package java.nio

Examples of java.nio.CharBuffer.subSequence()


            boolean hit = false;
            max = Math.min(max, MAX_SEARCH_RESULTS);
            while(lines.find()) {
                ++lineCount;
                if(target == null) {
                    if(DEFAULT_ANY_START.matcher(cb.subSequence(lines.start(), lines.end())).find()) {
                        target = getDefaultPatternForLevel(targetLevel).matcher("");
                        any = DEFAULT_ANY_START.matcher("");
                    } else {
                        target = getUnknownPatternForLevel(targetLevel).matcher("");
                        any = UNKNOWN_ANY_START.matcher("");
View Full Code Here


                    continue;
                }
                if(stop != null && stop.intValue() < lineCount) {
                    continue;
                }
                CharSequence line = cb.subSequence(lines.start(), lines.end());
                target.reset(line);
                if(target.find()) {
                    if(text != null) {
                        text.reset(line);
                        if(!text.find()) {
View Full Code Here

        final List floatList = new ArrayList();
       
        matchWhiteSpaceDelimnatedWords(cb,
                new WordListener() {
            public void word(int start, int end) {
                String fStringValue = cb.subSequence(start, end).toString();
                floatList.add(Float.valueOf(fStringValue));
            }
        }
        );
       
View Full Code Here

            int sizeRead = 0;
            do {
              sizeRead = fileReader.read(charBuffer.array(), 0, charBuffer.length());
              if (sizeRead != -1) {
                offset += sizeRead;
                text += charBuffer.subSequence(0, sizeRead);
                charBuffer.rewind();
              }
            } while (sizeRead != -1 && offset < fileSizeLimit);

            // complain if file size was too big after all - can happen if file size was impossible to be retrieved above
View Full Code Here

        final List longList = new ArrayList();

        matchWhiteSpaceDelimnatedWords(cb,
                new WordListener() {
            public void word(int start, int end) {
                String uuidValue = cb.subSequence(start, end).toString();
                fromUUIDString(uuidValue);
                longList.add(Long.valueOf(_msb));
                longList.add(Long.valueOf(_lsb));
            }
        }
View Full Code Here

        final List floatList = new ArrayList();

        matchWhiteSpaceDelimnatedWords(cb,
                new WordListener() {
            public void word(int start, int end) {
                String fStringValue = cb.subSequence(start, end).toString();
                floatList.add(Float.valueOf(fStringValue));
            }
        }
        );
View Full Code Here

        final List integerList = new ArrayList();

        matchWhiteSpaceDelimnatedWords(cb,
                new WordListener() {
            public void word(int start, int end) {
                String iStringValue = cb.subSequence(start, end).toString();
                integerList.add(Integer.valueOf(iStringValue));
            }
        }
        );
View Full Code Here

        final List shortList = new ArrayList();

        matchWhiteSpaceDelimnatedWords(cb,
                new WordListener() {
            public void word(int start, int end) {
                String iStringValue = cb.subSequence(start, end).toString();
                shortList.add(Short.valueOf(iStringValue));
            }
        }
        );
View Full Code Here

        final List doubleList = new ArrayList();

        matchWhiteSpaceDelimnatedWords(cb,
                new WordListener() {
            public void word(int start, int end) {
                String fStringValue = cb.subSequence(start, end).toString();
                doubleList.add(Double.valueOf(fStringValue));
            }
        }
        );
View Full Code Here

        final List longList = new ArrayList();

        matchWhiteSpaceDelimnatedWords(cb,
                new WordListener() {
            public void word(int start, int end) {
                String lStringValue = cb.subSequence(start, end).toString();
                longList.add(Long.valueOf(lStringValue));
            }
        }
        );
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.