java.io.BufferedReader.markSupported()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(179)

本文整理了Java中java.io.BufferedReader.markSupported()方法的一些代码示例,展示了BufferedReader.markSupported()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BufferedReader.markSupported()方法的具体详情如下:
包路径:java.io.BufferedReader
类名称:BufferedReader
方法名:markSupported

BufferedReader.markSupported介绍

[英]Indicates whether this reader supports the mark() and reset() methods. This implementation returns true.
[中]指示此读取器是否支持mark()和reset()方法。此实现返回true。

代码示例

代码示例来源:origin: com.atlassian.jira/jira-core

public boolean markSupported()
{
  return delegate.markSupported();
}

代码示例来源:origin: com.mchange/mchange-commons-java

public boolean markSupported()                                       { return inner.markSupported(); }
public void mark(int readAheadLimit) throws IOException              { inner.mark( readAheadLimit ); }

代码示例来源:origin: org.tinygroup/org.tinygroup.chineseanalyzer

public void reset() throws IOException {
  if (reader.markSupported()) {
    reader.mark(0);
  }
  reader.reset();
  buffer = null;
  index = 0;
  offset = 0;
  words = null;
}

代码示例来源:origin: org.jwall/org.jwall.web.audit

/**
 * This method tries to determine whether the reader produces lines in the
 * format of the ModSecurity 2.x serial audit-log files.
 * 
 * @param r
 *            The reader to read audit-data from.
 * @return <code>true</code> if the audit-log data could be parsed using the
 *         ModSecurity 2.x audit-format.
 * @throws IOException
 *             In case an I/O (read) error occurred.
 */
public static boolean isSerial2xLog(BufferedReader r) throws IOException {
  if (r.markSupported())
    r.mark(4096);
  int retry = 10;
  while (retry-- > 0) {
    String line = r.readLine();
    if (line == null)
      return false;
    if (line.matches("^--[A-Za-z0-9]*-A--$")) {
      if (r.markSupported())
        r.reset();
      return true;
    }
  }
  if (r.markSupported())
    r.reset();
  return false;
}

代码示例来源:origin: org.jwall/org.jwall.web.audit

if (r.markSupported())
    r.mark(4096);
      if (r.markSupported())
        r.reset();
      return true;
  if (r.markSupported())
    r.reset();
} catch (Exception e) {

代码示例来源:origin: org.jwall/org.jwall.web.audit

if (r.markSupported())
  r.mark(4096);
    AuditEvent evt = AccessLogAuditReader.createEvent(line);
    if (evt != null) {
      if (r.markSupported())
        r.reset();
      return true;
  if (r.markSupported())
    r.reset();
  return false;

代码示例来源:origin: stackoverflow.com

if (in.markSupported()) {

代码示例来源:origin: com.github.meirfaraj/gcAnalyser-lib

String line = "";
if (!in.markSupported()) {
  LOGGER.warn("input stream does not support marking!");
} else {
    if (in.markSupported()) {
      in.mark(200);
if (in.markSupported()) {
  try {
    in.reset();

代码示例来源:origin: com.mgmtp.gcviewer/gcviewer

String line = "";
if (!in.markSupported()) {
  LOG.warning("input stream does not support marking!");
    if (in.markSupported()) {
      in.mark(200);
if (in.markSupported()) {
  try {
    in.reset();

代码示例来源:origin: net.loomchild/segment

if (!reader.markSupported()) {
  throw new IllegalArgumentException("Mark not supported for reader.");

代码示例来源:origin: com.github.meirfaraj/gcAnalyser-lib

String line = "";
if (!in.markSupported()) {
  LOGGER.warn("input stream does not support marking!");
} else {
      if (in.markSupported()) {
        in.mark(200);
if (in.markSupported()) {
  try {
    in.reset();

代码示例来源:origin: IQSS/dataverse

if (reader.markSupported()){
  reader.mark(100000);

代码示例来源:origin: org.jwall/org.jwall.web.audit

if( reader.markSupported() )
  reader.reset();
return null;

代码示例来源:origin: org.jwall/org.jwall.web.audit

if( reader.markSupported() )
  reader.reset();
return null;

代码示例来源:origin: google/sagetv

if (!inStream.markSupported())
if (inStream.markSupported() && monitorFile) inStream.mark(16384);
String line = inStream.readLine();
while (line != null)
    inStream.markSupported() && lastSubtitle[i] == SUBTITLE_OK && line == null ?
      SUBTITLE_RETRY : SUBTITLE_OK;
  if (inStream.markSupported() && monitorFile && lastSubtitle[i] == SUBTITLE_OK) inStream.mark(16384);
   if (inStream.markSupported() && monitorFile) inStream.reset();
if (inStream.markSupported() && monitorFile) inStream.reset();

代码示例来源:origin: jp.terasoluna.fw/terasoluna-filedao

if (!reader.markSupported()) {
  throw new FileException("BufferedReader of this JVM dose not support mark method");

代码示例来源:origin: stackoverflow.com

skipLfMark = skipLf;
reopenOnReset = false;
if (reader.markSupported()) {
  if (readAheadLimit >= reopenOnResetThreshold) {
    reader.mark(reopenOnResetThreshold);
if (reopenOnReset ||
    readSinceMark.compareTo(reopenOnResetThresholdBI) >= 0 ||
    !reader.markSupported()) {
  if (!reopenAt(mark)) {
    throw new IOException("reopening at position failed");

代码示例来源:origin: com.github.meirfaraj/gcAnalyser-lib

if (!in.markSupported()) {
  LOGGER.warn("input stream does not support marking!");
} else {

相关文章