public interface CodeData
This interface is an abstraction for the application to be able to read different input and output formats (e.g. streams from a file or from other transports like HTTP).
Modifier and Type | Method and Description |
---|---|
InputStream |
getInput()
Returns an input stream for reading the source data.
|
OutputStream |
getOutput()
Returns an output stream for writing the output csv data.
|
OutputStream |
getOutputForIdent(CodeType type,
EncodingConfig format,
String ident,
String suffix)
Returns an individual output stream for writing the barcode for the given identifier and format.
|
InputStream getInput() throws IOException
Returns an input stream for reading the source data.
InputStream
for reading the input data.IOException
- if the creation of the InputStream
fails.OutputStream getOutput() throws IOException
Returns an output stream for writing the output csv data.
OutputStream
for writing the output csv data.IOException
- if the creation of the OutputStream
fails.OutputStream getOutputForIdent(CodeType type, EncodingConfig format, String ident, String suffix) throws IOException
Returns an individual output stream for writing the barcode for the given identifier and format.
type
- the type of the code to write.format
- the format of the random number (e.g. hex)ident
- the identifier from the input file.suffix
- the suffix of the file.OutputStream
for writing the individual barcode.IOException
- if the creation of the OutputStream
fails.Copyright © 2020 sw4j.org. All rights reserved.