當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。