Package org.eclipse.packager.io
Class OutputSpooler
java.lang.Object
org.eclipse.packager.io.OutputSpooler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddOutput(String fileName, String mimeType, IOFunction<OutputStream, OutputStream> transformer) getChecksum(String fileName, String algorithm) Get the digest of a closed filelongGet the size of a closed filevoidopen(IOConsumer<OutputStream> consumer) protected voidopenNext(List<OutputStream> streams, Iterator<Map.Entry<String, org.eclipse.packager.io.OutputSpooler.OutputEntry>> entries, IOConsumer<List<OutputStream>> streamsConsumer)
-
Constructor Details
-
OutputSpooler
-
-
Method Details
-
addDigest
-
addOutput
-
addOutput
public void addOutput(String fileName, String mimeType, IOFunction<OutputStream, OutputStream> transformer) -
open
- Throws:
IOException
-
openNext
protected void openNext(List<OutputStream> streams, Iterator<Map.Entry<String, org.eclipse.packager.io.OutputSpooler.OutputEntry>> entries, IOConsumer<List<OutputStream>> streamsConsumer) throws IOException- Throws:
IOException
-
getChecksum
Get the digest of a closed file- Parameters:
fileName- the file name to get the digest foralgorithm- the digest algorithm- Returns:
- the digest or
nullif the digest was not requested. The digest will be lower case hex encoded. - Throws:
IllegalStateException- If the file is still open or was never opened
-
getSize
Get the size of a closed file- Parameters:
fileName- the file name to get the size for- Returns:
- the size
- Throws:
IllegalStateException- If the file is still open or was never opened
-