Tabnine Logo
FilterReader.read
Code IndexAdd Tabnine to your IDE (free)

How to use
read
method
in
java.io.FilterReader

Best Java code snippets using java.io.FilterReader.read (Showing top 20 results out of 441)

origin: oracle/opengrok

@Override
public int read() throws IOException {
  if (spacesToInsert > 0) {
    pos++;
    spacesToInsert--;
    return ' ';
  }
  int c = super.read();
  if (c == '\t') {
    // Fill up with spaces up to the next tab stop
    int spaces = tabSize - (pos % tabSize);
    pos++;
    spacesToInsert = spaces - 1;
    return ' ';
  }
  if (c == '\n' || c == '\r') {
    // Reset position on new line
    pos = 0;
  } else {
    pos++;
  }
  return c;
}
origin: google/guava

 @Override
 public int read(char[] cbuf, int off, int len) throws IOException {
  return super.read(cbuf, off, Math.min(chunk, len));
 }
};
origin: marytts/marytts

public int read(char[] cbuf, int off, int len) throws IOException {
  int nr = super.read(cbuf, off, len);
  if (nr == -1) {
    logRead();
  } else {
    logText.append(new String(cbuf, off, nr));
  }
  return nr;
}
origin: marytts/marytts

public int read() throws IOException {
  int c = super.read();
  if (c == -1) {
    logRead();
  } else {
    logText.append((char) c);
  }
  return c;
}
origin: marytts/marytts

public int read(char[] cbuf, int off, int len) throws IOException {
  int nr = super.read(cbuf, off, len);
  if (nr == -1) {
    logRead();
  } else {
    logText.append(new String(cbuf, off, nr));
  }
  return nr;
}
origin: marytts/marytts

public int read() throws IOException {
  int c = super.read();
  if (c == -1) {
    logRead();
  } else {
    logText.append((char) c);
  }
  return c;
}
origin: Sable/soot

int ch = super.read();
ch = super.read();
if (ch != 'u') {
 nextF = true;
 ch = super.read();
 mini.append((char) ch);
origin: neo4j-contrib/neo4j-apoc-procedures

@Override
public int read(char[] cbuf, int off, int len) throws IOException {
  int read = super.read(cbuf, off, len);
  count+=read;
  for (int i=off;i<off+len;i++) {
    if (cbuf[i] == '\n') newLines++;
  }
  return read;
}
origin: neo4j-contrib/neo4j-apoc-procedures

@Override
public int read() throws IOException {
  count++;
  int read = super.read();
  if (read == '\n') newLines++;
  return read;
}
origin: webx/citrus

  @Override
  public int read(char[] cbuf, int off, int len) throws IOException {
    int count = super.read(cbuf, off, len);

    if (count > 0) {
      converter.convert(cbuf, off, count);
    }

    return count;
  }
}
origin: webx/citrus

  @Override
  public int read(char[] cbuf, int off, int len) throws IOException {
    int count = super.read(cbuf, off, len);

    if (count > 0) {
      converter.convert(cbuf, off, count);
    }

    return count;
  }
}
origin: webx/citrus

@Override
public int read() throws IOException {
  int ch = super.read();
  if (ch < 0) {
    return ch;
  }
  return converter.convert((char) ch);
}
origin: webx/citrus

  @Override
  public int read(char[] cbuf, int off, int len) throws IOException {
    int count = super.read(cbuf, off, len);

    if (count > 0) {
      converter.convert(cbuf, off, count);
    }

    return count;
  }
}
origin: webx/citrus

@Override
public int read() throws IOException {
  int ch = super.read();
  if (ch < 0) {
    return ch;
  }
  return converter.convert((char) ch);
}
origin: webx/citrus

@Override
public int read() throws IOException {
  int ch = super.read();
  if (ch < 0) {
    return ch;
  }
  return converter.convert((char) ch);
}
origin: bramp/ffmpeg-cli-wrapper

 @Override
 public int read() throws IOException {
  int ret = super.read();
  if (ret != -1) {
   buffer.append((char) ret);
  }

  // If end of stream, or contains new line
  if (ret == -1 || ret == LOG_CHAR) {
   log();
  }
  return ret;
 }
}
origin: bramp/ffmpeg-cli-wrapper

@Override
public int read(char[] cbuf, int off, int len) throws IOException {
 int ret = super.read(cbuf, off, len);
 if (ret != -1) {
  buffer.append(cbuf, off, ret);
 }
 // If end of stream, or contains new line
 if (ret == -1 || indexOf(cbuf, LOG_CHAR, off, ret) != -1) {
  // BUG this will log a unfinished line, if a string such as
  // "line \n unfinished" is read.
  log();
 }
 return ret;
}
origin: ml.alternet/alternet-tools

@Override
public int read() throws IOException {
  int n = super.read();
  if (n != -1) {
    out.write(n);
  }
  return n;
}
origin: net.sf.jsignature.io-tools/easystream

/** {@inheritDoc} */
@Override
public int read(final char[] b) throws IOException {
  checkCloseInvoked("read(byte[])");
  return super.read(b);
}
origin: knightliao/common-utils

  @Override
  public int read(char[] cbuf, int off, int len) throws IOException {
    int count = super.read(cbuf, off, len);

    if (count > 0) {
      converter.convert(cbuf, off, count);
    }

    return count;
  }
}
java.ioFilterReaderread

Javadoc

Reads a single character from the filtered reader and returns it as an integer with the two higher-order bytes set to 0. Returns -1 if the end of the filtered reader has been reached.

Popular methods of FilterReader

  • close
    Closes this reader. This implementation closes the filtered reader.
  • skip
    Skips characters.
  • ready
    Tells whether this stream is ready to be read.
  • mark
    Marks the present position in the stream.
  • reset
    Resets the stream.
  • <init>
    Creates a new filtered reader.
  • markSupported
    Tells whether this stream supports the mark() operation.

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • Kernel (java.awt.image)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now