当前位置: 首页>>代码示例>>Java>>正文


Java Reader.markSupported方法代码示例

本文整理汇总了Java中java.io.Reader.markSupported方法的典型用法代码示例。如果您正苦于以下问题:Java Reader.markSupported方法的具体用法?Java Reader.markSupported怎么用?Java Reader.markSupported使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.Reader的用法示例。


在下文中一共展示了Reader.markSupported方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JSONTokener

import java.io.Reader; //导入方法依赖的package包/类
/**
 * Construct a JSONTokener from a Reader.
 *
 * @param reader     A reader.
 */
public JSONTokener(Reader reader) {
    this.reader = reader.markSupported()
        ? reader
        : new BufferedReader(reader);
    this.eof = false;
    this.usePrevious = false;
    this.previous = 0;
    this.index = 0;
    this.character = 1;
    this.line = 1;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:JSONTokener.java

示例2: JSONTokener

import java.io.Reader; //导入方法依赖的package包/类
/**
 * Construct a JSONTokener from a Reader. The caller must close the Reader.
 *
 * @param reader     A reader.
 */
public JSONTokener(Reader reader) {
    this.reader = reader.markSupported()
            ? reader
                    : new BufferedReader(reader);
    this.eof = false;
    this.usePrevious = false;
    this.previous = 0;
    this.index = 0;
    this.character = 1;
    this.characterPreviousLine = 0;
    this.line = 1;
}
 
开发者ID:yacy,项目名称:yacy_grid_mcp,代码行数:18,代码来源:JSONTokener.java

示例3: JSONTokener

import java.io.Reader; //导入方法依赖的package包/类
/**
 * Construct a JSONTokener from a Reader.
 * 
 * @param reader
 *            A reader.
 */
public JSONTokener(Reader reader) {
    this.reader = reader.markSupported() ? reader : new BufferedReader(reader);
    this.eof = false;
    this.usePrevious = false;
    this.previous = 0;
    this.index = 0;
    this.character = 1;
    this.line = 1;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:16,代码来源:JSONTokener.java

示例4: JSONTokener

import java.io.Reader; //导入方法依赖的package包/类
/**
 * Construct a JSONTokener from a string.
 *
 * @param reader     A reader.
 */
public JSONTokener(Reader reader) {
    this.reader = reader.markSupported() ? 
            reader : new BufferedReader(reader);
    this.useLastChar = false;
    this.index = 0;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:12,代码来源:JSONTokener.java

示例5: JSONTokener

import java.io.Reader; //导入方法依赖的package包/类
/**
 * Construct a JSONTokener from a string.
 *
 * @param reader     A reader.
 */
public JSONTokener(Reader reader) {
    this.reader = reader.markSupported() ? 
    		reader : new BufferedReader(reader);
    this.useLastChar = false;
    this.index = 0;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:JSONTokener.java

示例6: JSONTokenizer

import java.io.Reader; //导入方法依赖的package包/类
public JSONTokenizer(Reader reader) {
    this.reader = reader.markSupported() ? reader : new BufferedReader(reader);
    this.eof = false;
    this.usePrevious = false;
    this.previous = 0;
    this.index = 0;
    this.character = 1;
    this.line = 1;
}
 
开发者ID:syhily,项目名称:elasticsearch-jdbc,代码行数:10,代码来源:JSONTokenizer.java

示例7: trailingSpace

import java.io.Reader; //导入方法依赖的package包/类
private static boolean trailingSpace(Reader in) throws IOException {

        boolean trailing = false;

        if (!in.markSupported()) {
            // oh well
            return true;
        } else {
            // make readAheadLimit huge -
            // in practice, AVA was passed a StringReader from X500Name,
            // and StringReader ignores readAheadLimit anyways
            in.mark(9999);
            while (true) {
                int nextChar = in.read();
                if (nextChar == -1) {
                    trailing = true;
                    break;
                } else if (nextChar == ' ') {
                    continue;
                } else if (nextChar == '\\') {
                    int followingChar = in.read();
                    if (followingChar != ' ') {
                        trailing = false;
                        break;
                    }
                } else {
                    trailing = false;
                    break;
                }
            }

            in.reset();
            return trailing;
        }
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:36,代码来源:AVA.java

示例8: JSONTokener

import java.io.Reader; //导入方法依赖的package包/类
/**
 * Construct a JSONTokener from a Reader.
 *
 * @param reader A reader.
 */
public JSONTokener(Reader reader) {
    this.reader = reader.markSupported()
            ? reader
            : new BufferedReader(reader);
    this.eof = false;
    this.usePrevious = false;
    this.previous = 0;
    this.index = 0;
    this.character = 1;
    this.line = 1;
}
 
开发者ID:GloriousEggroll,项目名称:quorrabot,代码行数:17,代码来源:JSONTokener.java


注:本文中的java.io.Reader.markSupported方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。