public class DebianPackageWriter extends Object implements AutoCloseable, BinaryPackageBuilder
| Constructor and Description |
|---|
DebianPackageWriter(OutputStream stream,
GenericControlFile packageControlFile) |
DebianPackageWriter(OutputStream stream,
GenericControlFile packageControlFile,
TimestampProvider timestampProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDirectory(String directory,
EntryInformation entryInformation)
Add a directory to the binary package
|
void |
addFile(byte[] content,
String fileName,
EntryInformation entryInformation) |
void |
addFile(ContentProvider contentProvider,
String fileName,
EntryInformation entryInformation)
Add a file to the binary package
|
void |
addFile(File file,
String fileName,
EntryInformation entryInformation) |
void |
addFile(String content,
String fileName,
EntryInformation entryInformation) |
void |
close() |
protected ContentProvider |
createChecksumContent() |
protected ContentProvider |
createConfFilesContent() |
protected ContentProvider |
createControlContent() |
TimestampProvider |
getTimestampProvider() |
protected void |
internalAddDirectory(String path,
EntryInformation entryInformation) |
void |
setPostinstScript(ContentProvider postinstScript) |
void |
setPostrmScript(ContentProvider postrmScript) |
void |
setPreinstScript(ContentProvider preinstScript) |
void |
setPrermScript(ContentProvider prermScript) |
public static final Charset CHARSET
public DebianPackageWriter(OutputStream stream, GenericControlFile packageControlFile) throws IOException
IOExceptionpublic DebianPackageWriter(OutputStream stream, GenericControlFile packageControlFile, TimestampProvider timestampProvider) throws IOException
IOExceptionpublic void addFile(File file, String fileName, EntryInformation entryInformation) throws IOException
IOExceptionpublic void addFile(byte[] content,
String fileName,
EntryInformation entryInformation)
throws IOException
IOExceptionpublic void addFile(String content, String fileName, EntryInformation entryInformation) throws IOException
IOExceptionpublic void addFile(ContentProvider contentProvider, String fileName, EntryInformation entryInformation) throws IOException
BinaryPackageBuilderaddFile in interface BinaryPackageBuildercontentProvider - the content providerfileName - the name of the target fileentryInformation - additional entry informationIOException - if the file cannot be written to the packagepublic void addDirectory(String directory, EntryInformation entryInformation) throws IOException
BinaryPackageBuilderaddDirectory in interface BinaryPackageBuilderdirectory - the name of the target directoryentryInformation - additional entry informationIOException - if the directory information cannot be written to the packageprotected void internalAddDirectory(String path, EntryInformation entryInformation) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOExceptionprotected ContentProvider createControlContent() throws IOException
IOExceptionprotected ContentProvider createChecksumContent() throws IOException
IOExceptionprotected ContentProvider createConfFilesContent() throws IOException
IOExceptionpublic void setPostinstScript(ContentProvider postinstScript)
public void setPostrmScript(ContentProvider postrmScript)
public void setPreinstScript(ContentProvider preinstScript)
public void setPrermScript(ContentProvider prermScript)
public TimestampProvider getTimestampProvider()
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.