com.alexecollins.docker.orchestration.util
public class TokenReplacingReader extends Reader
A token replacing reader which replaces tokens of the form
${tokenName}. The replacement value is provided by an
implementation of the interface TokenResolver.
Origin: http://tutorials.jenkov.com/java-howto/replace-strings-in-streams-arrays-files.html
| Modifier and Type | Field and Description |
|---|---|
protected PushbackReader |
pushbackReader |
protected StringBuilder |
tokenNameBuffer |
protected TokenResolver |
tokenResolver |
protected String |
tokenValue |
protected int |
tokenValueIndex |
| Constructor and Description |
|---|
TokenReplacingReader(Reader source,
TokenResolver resolver) |
protected PushbackReader pushbackReader
protected TokenResolver tokenResolver
protected StringBuilder tokenNameBuffer
protected String tokenValue
protected int tokenValueIndex
public TokenReplacingReader(Reader source, TokenResolver resolver)
public int read(CharBuffer target) throws IOException
read in interface Readableread in class ReaderIOExceptionpublic int read()
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf)
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in class ReaderIOExceptionpublic long skip(long n)
throws IOException
skip in class ReaderIOExceptionpublic boolean ready()
throws IOException
ready in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Readerpublic void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOExceptionpublic void reset()
throws IOException
reset in class ReaderIOExceptionCopyright © 2014. All Rights Reserved.