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
IOException
public DebianPackageWriter(OutputStream stream, GenericControlFile packageControlFile, TimestampProvider timestampProvider) throws IOException
IOException
public void addFile(File file, String fileName, EntryInformation entryInformation) throws IOException
IOException
public void addFile(byte[] content, String fileName, EntryInformation entryInformation) throws IOException
IOException
public void addFile(String content, String fileName, EntryInformation entryInformation) throws IOException
IOException
public void addFile(ContentProvider contentProvider, String fileName, EntryInformation entryInformation) throws IOException
BinaryPackageBuilder
addFile
in interface BinaryPackageBuilder
contentProvider
- 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
BinaryPackageBuilder
addDirectory
in interface BinaryPackageBuilder
directory
- 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
IOException
public void close() throws IOException
close
in interface AutoCloseable
IOException
protected ContentProvider createControlContent() throws IOException
IOException
protected ContentProvider createChecksumContent() throws IOException
IOException
protected ContentProvider createConfFilesContent() throws IOException
IOException
public 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.