public class TransformerStorage extends Object implements TransformerBinaryStorage
| Constructor and Description |
|---|
TransformerStorage(BinaryStorageBase baseStorage) |
| Modifier and Type | Method and Description |
|---|---|
void |
createDirectories(Path... paths)
Create directories on file system.
|
Function<File,byte[]> |
fileReader()
Constructs reader function that reads content from a file as array of bytes.
|
BiConsumer<File,byte[]> |
fileWriter()
Constructs writer function that writes array of bytes to a file.
|
BiConsumer<Writer,File> |
flushWriter()
Flushes writer to the file.
|
BiFunction<File,String,Writer> |
getWriter()
Constructs a function that returns writer for a given
outputFile
possibly using charsetName when non-null. |
public TransformerStorage(BinaryStorageBase baseStorage)
public Function<File,byte[]> fileReader()
TransformerBinaryStoragefileReader in interface TransformerBinaryStorageFile and returns byte[] array.public BiConsumer<File,byte[]> fileWriter()
TransformerBinaryStoragefileWriter in interface TransformerBinaryStorageFile as a destination parameter
and byte[] array that should be written to the destination.public BiFunction<File,String,Writer> getWriter()
TransformerBinaryStorageoutputFile
possibly using charsetName when non-null.getWriter in interface TransformerBinaryStorageLambda arguments:
File were the writer should writes to;String encoding. When non-null used when writing to the output file;Writer an initialized writer.public BiConsumer<Writer,File> flushWriter()
TransformerBinaryStorageflushWriter in interface TransformerBinaryStorageWriter with content
and target File.public void createDirectories(Path... paths) throws IOException
TransformerBinaryStoragecreateDirectories in interface TransformerBinaryStoragepaths - paths to create.IOException - creating is failed.Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries