org.opensolaris.opengrok.analysis
Class ExpandTabsReader
java.lang.Object
java.io.Reader
java.io.FilterReader
org.opensolaris.opengrok.analysis.ExpandTabsReader
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
public class ExpandTabsReader
- extends java.io.FilterReader
Wrapper around Reader to expand tabs to spaces in the input.
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Method Summary |
boolean |
markSupported()
|
int |
read()
|
int |
read(char[] cbuf,
int off,
int len)
|
long |
skip(long n)
|
static java.io.Reader |
wrap(java.io.Reader in,
Project p)
Wrap a reader in an ExpandTabsReader if the project has custom tab
size settings. |
Methods inherited from class java.io.FilterReader |
close, mark, ready, reset |
Methods inherited from class java.io.Reader |
read, read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wrap
public static java.io.Reader wrap(java.io.Reader in,
Project p)
- Wrap a reader in an ExpandTabsReader if the project has custom tab
size settings.
- Parameters:
in
- the reader to wrapp
- the project
- Returns:
in
if the project doesn't have custom tab settings;
otherwise, an ExpandTabsReader
that wraps in
and expands
tabs as defined by the project's settings
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.FilterReader
- Throws:
java.io.IOException
read
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.FilterReader
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Overrides:
skip
in class java.io.FilterReader
- Throws:
java.io.IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class java.io.FilterReader