public interface AsicWriter
| Modifier and Type | Method and Description |
|---|---|
AsicWriter |
add(File file)
Adds another data object to the ASiC archive.
|
AsicWriter |
add(File file,
String entryName)
Adds another data object to the ASiC container, using the supplied name as the zip entry name
|
AsicWriter |
add(File file,
String entryName,
MimeType mimeType)
Adds the contents of a file into the ASiC archive using the supplied entry name and MIME type.
|
AsicWriter |
add(InputStream inputStream,
String filename)
Adds the data provided by the stream into the ASiC archive, using the name of the supplied file as the
entry name.
|
AsicWriter |
add(InputStream inputStream,
String filename,
MimeType mimeType)
Adds the contents of an input stream into the ASiC archive, under a given entry name and explicitly
identifying the MIME type.
|
AsicWriter |
add(Path path)
Adds another data object to the ASiC archive
|
AsicWriter |
add(Path path,
String entryName)
Adds another data object to the ASiC container under the entry name provided.
|
AsicWriter |
add(Path path,
String entryName,
MimeType mimeType) |
AsicWriter |
setRootEntryName(String name)
Specifies which entry (file) represents the "root" document, i.e. which business document to read first.
|
AsicWriter |
sign(File keyStoreFile,
String keyStorePassword,
String keyPassword)
Signs and closes the ASiC archive.
|
AsicWriter |
sign(File keyStoreFile,
String keyStorePassword,
String keyAlias,
String keyPassword)
Signs and closes the ASiC archive using the private and public key stored in the supplied key store under the supplied alias name.
|
AsicWriter |
sign(SignatureHelper signatureHelper)
Allows re-use of the same SignatureHelper object when creating multiple ASiC archive and hence the need to create multiple signatures.
|
AsicWriter add(File file) throws IOException
file - references the file to be added as a data object. The name of the entry is
extracted from the File object.IOExceptionAsicWriter add(File file, String entryName) throws IOException
file - references the file to be added as a data object.entryName - the archive entry name to be used.IOExceptionAsicWriter add(Path path) throws IOException
path - references the file to be added.IOExceptionadd(File)AsicWriter add(Path path, String entryName) throws IOException
path - reference to this AsicWriter.entryName - the archive entry name to be used.IOExceptionadd(File, String)AsicWriter add(InputStream inputStream, String filename) throws IOException
inputStream - input stream of data.filename - the name of a file, which must be available in the file system in order to determine the MIME type.IOExceptionAsicWriter add(File file, String entryName, MimeType mimeType) throws IOException
file - references the file to be added as a data object.entryName - the archive entry name to be used.mimeType - explicitly identifies the MIME type of the entry.IOExceptionAsicWriter add(Path path, String entryName, MimeType mimeType) throws IOException
IOExceptionadd(File, String, MimeType)AsicWriter add(InputStream inputStream, String filename, MimeType mimeType) throws IOException
IOExceptionadd(Path, String, MimeType)AsicWriter setRootEntryName(String name)
name - of entry holding the root document.AsicWriter sign(File keyStoreFile, String keyStorePassword, String keyPassword) throws IOException
keyStoreFile - the file holding the JKS keystore file.keyStorePassword - password for the keystorekeyPassword - password protecting the private key.IOExceptionAsicWriter sign(File keyStoreFile, String keyStorePassword, String keyAlias, String keyPassword) throws IOException
keyStoreFile - the file holding the JKS keystore file.keyStorePassword - password for the keystorekeyAlias - the alias of the keystore entry holding the private and the public key.keyPassword - password protecting the private key.IOExceptionAsicWriter sign(SignatureHelper signatureHelper) throws IOException
signatureHelper - instantiated SignatureHelperIOExceptionsign(File, String, String, String)Copyright © 2015 Norwegian Agency for Public Management and eGovernment (Difi). All rights reserved.