Codota Logo
FilterReader
Code IndexAdd Codota to your IDE (free)

How to use
FilterReader
in
java.io

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
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: org.apache.ant/ant

@Override
public void close() throws IOException {
  cleanUpClassLoaders(cleanupLoaders);
  super.close();
}
origin: neo4j-contrib/neo4j-apoc-procedures

@Override
public long skip(long n) throws IOException {
  count += n;
  return super.skip(n);
}
origin: Sable/soot

 public boolean ready() throws IOException {
  return pos < length || super.ready();
 }
}
origin: com.googlecode.mycontainer/mycontainer-commons

@Override
public boolean ready() {
  try {
    return super.ready();
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}
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: org.freemarker/freemarker

@Override
public void close() throws IOException {
  if (lineBuf.length() > 0) {
    lines.add(lineBuf.toString());
    lineBuf.setLength(0);
  }
  super.close();
  closed = true;
}
origin: jexp/neo4j-shell-tools

@Override
public long skip(long n) throws IOException {
  count += n;
  return super.skip(n);
}
origin: zolyfarkas/spf4j

@Override
public boolean ready() throws IOException {
  ensureOpen();
  return (pos < buf.length) || super.ready();
}
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 void close() throws IOException {
  super.close();
  logRead();
}
origin: org.codehaus.janino/commons-compiler-jdk

@Override public long
skip(long n) throws IOException {
  this.aboutToRead();
  return super.skip(n);
}
origin: zolyfarkas/spf4j

@Override
public boolean ready() throws IOException {
  ensureOpen();
  return (pos < buf.length) || super.ready();
}
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 void close() throws IOException {
  super.close();
  logRead();
}
origin: net.sf.jsignature.io-tools/easystream

  /** {@inheritDoc} */
  @Override
  public long skip(final long n) throws IOException {
    checkCloseInvoked("skip");
    return super.skip(n);
  }
}
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: ml.alternet/alternet-tools

/**
 * Really close the input.
 *
 * @see java.io.Reader#close()
 *
 * @throws IOException When an I/O error occurs.
 */
public void doClose() throws IOException {
  super.close();
}
origin: zolyfarkas/spf4j

@Override
public long skip(final long pn) throws IOException {
  long n = pn;
  if (n < 0L) {
    throw new IllegalArgumentException("skip value is negative " + pn);
  }
  ensureOpen();
  int avail = buf.length - pos;
  if (avail > 0) {
    if (n <= avail) {
      pos += n;
      return n;
    } else {
      pos = buf.length;
      n -= avail;
    }
  }
  return avail + super.skip(n);
}
origin: marytts/marytts

public int read() throws IOException {
  int c = super.read();
  if (c == -1) {
    logRead();
  } else {
    logText.append((char) c);
  }
  return c;
}
java.ioFilterReader

Javadoc

Wraps an existing Reader and performs some transformation on the input data while it is being read. Transformations can be anything from a simple byte-wise filtering input data to an on-the-fly compression or decompression of the underlying reader. Readers that wrap another reader and provide some additional functionality on top of it usually inherit from this class.

Most used methods

  • read
    Reads characters into a portion of an array.
  • 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
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now