org.foray.ps.encode
Class EncodingVectorInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.foray.ps.encode.EncodingVectorInputStream
- All Implemented Interfaces:
- Closeable
public class EncodingVectorInputStream
- extends FilterInputStream
A filter that can decode content from a given PsEncoding
to Unicode.
The input is assumed to be single-byte characters, but the filtered value can be multi-byte.
A "main" method is provided, which writes the output to a UTF-8 file.
Method Summary |
static void |
main(String[] args)
Command-line interface. |
int |
read()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncodingVectorInputStream
public EncodingVectorInputStream(InputStream inputStream,
org.axsl.ps.PsEncoding encoding)
- Constructor.
- Parameters:
inputStream
- The underlying input stream from which the encoded data should be read.
This stream is assumed to contain single-byte characters, encoded with encoding
.encoding
- The encoding in which inputStream
is assumed to be encoded.
read
public int read()
throws IOException
- Overrides:
read
in class FilterInputStream
- Throws:
IOException
main
public static void main(String[] args)
- Command-line interface.
Reads a specified input file in a specified encoding, and writes the output to a specified file in UTF-8
encoding.
- Parameters:
args
- The command-line arguments:
- i, input, The path to the input file.
- o, output, The path to the ouput file.
- e, encoding, The PostScript name of the encoding of the input.
Copyright © 2017. All rights reserved.