final class ArchiveCreatorBZip2 extends AbstractArchiveCreator[ArchiveCreatorBZip2] with AdapterBZip2 with SetLevel[ArchiveCreatorBZip2]
Concrete creator for BZip2 archives.
- Alphabetic
- By Inheritance
- ArchiveCreatorBZip2
- SetLevel
- AdapterBZip2
- AbstractAdapter
- AbstractArchiveCreator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ArchiveCreatorBZip2()
Type Members
- type TEntry = CompressionEntryBZip2
- Attributes
- protected
- Definition Classes
- ArchiveCreatorBZip2 → AbstractArchiveCreator
- type TItem = IOutItemBZip2
- Attributes
- protected
- Definition Classes
- ArchiveCreatorBZip2 → AbstractArchiveCreator
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def adaptEntryToItem(entry: CompressionEntryBZip2, template: IOutItemBZip2): IOutItemBZip2
adaptEntryToItem
is an adapter fromCompressionEntry
toIOutItem
, it requires an default instance ofIOutItem
as a template so that it can work without the knowledge of the construction of it.adaptEntryToItem
is an adapter fromCompressionEntry
toIOutItem
, it requires an default instance ofIOutItem
as a template so that it can work without the knowledge of the construction of it.- entry
input
CompressionEntry
for adapting- template
an default instance of
IOutItem
- returns
IOutItem
whose properties are already set according toentry
- Attributes
- protected
- Definition Classes
- AdapterBZip2 → AbstractAdapter
- def adaptItemToEntry(item: IOutItemBZip2): CompressionEntryBZip2
adaptItemToEntry
is an adapter fromIOutItem
toCompressionEntry
, and unlikeadaptEntryToItem
, it knows how to constructCompressionEntry
, so template isn't required.adaptItemToEntry
is an adapter fromIOutItem
toCompressionEntry
, and unlikeadaptEntryToItem
, it knows how to constructCompressionEntry
, so template isn't required.- item
input
IOutItem
for adapting- returns
CompressionEntry
whose properties are already set according toitem
- Attributes
- protected
- Definition Classes
- AdapterBZip2 → AbstractAdapter
- val archive: IOutCreateArchiveBZip2
- Attributes
- protected
- Definition Classes
- ArchiveCreatorBZip2 → SetLevel
- val archivePrototype: IOutCreateArchive[TItem]
archivePrototype
will be casted to specific type in subclasses so that their features can be enabled.archivePrototype
will be casted to specific type in subclasses so that their features can be enabled.- Attributes
- protected
- Definition Classes
- AbstractArchiveCreator
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def compress(entries: Seq[TEntry]): Unit
Final stage of the archive creation, it will create an archive with given entries.
Final stage of the archive creation, it will create an archive with given entries. After this operation, this ArchiveCreator may not be reused.
Note that some archive formats (
bzip2
,gzip
) only supports compression of single archive entry (thus they're usually used along withtar
). Socompress
withSeq[TEntry]
is madeprotected
, only those supporting multi-archive override it topublic
.- entries
entries in the expected archive to be created.
- Attributes
- protected
- Definition Classes
- AbstractArchiveCreator
- def compress(entry: TEntry): Unit
Final stage of the archive creation, it will create an archive with given entry.
Final stage of the archive creation, it will create an archive with given entry. After this operation, this ArchiveCreator may not be reused.
- entry
entry in the expected archive to be created.
- Definition Classes
- AbstractArchiveCreator
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- val format: net.sf.sevenzipjbinding.ArchiveFormat
Subclass override
format
to specify which format of archive it intends to create.Subclass override
format
to specify which format of archive it intends to create.Subclass must make sure format get initialized before this trait, (by early definition, maybe) as archivePrototype will use it during trait initialization.
- Attributes
- protected
- Definition Classes
- ArchiveCreatorBZip2 → AbstractArchiveCreator
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def onEachEnd(f: (Boolean) => Unit): ArchiveCreatorBZip2
Provides callback triggered after each solid operation.
Provides callback triggered after each solid operation.
Usually, the operation of compression of an nonempty entry is solid, after which this callback gets triggered and supplies a boolean parameter indicating whether this operation is successful.
Note that directory entry and file entry whose size is zero normally doesn't trigger this callback.
- f
isSuccessful =>
Unit
- returns
creator itself so that method calls can be chained
- Definition Classes
- AbstractArchiveCreator
- def onProcess(progressTracker: (Long, Long) => Unit): ArchiveCreatorBZip2
Provides callback triggered during compression operation.
Provides callback triggered during compression operation.
First parameter of the callback is the number of bytes completed compression, the second one is the total number of bytes to compress. Together, they can describe the progress of compression.
Note that the time and frequency of this callback's trigger is unknown. And it's only relevant with the bytes to compress, nothing to do with the entries.
- progressTracker
(completed, total) =>
Unit
- returns
creator itself so that method calls can be chained
- Definition Classes
- AbstractArchiveCreator
- def setLevel(compressionLevel: Int): ArchiveCreatorBZip2
- Definition Classes
- SetLevel
- def setPassword(passwd: String): ArchiveCreatorBZip2
Sets up password protection for this archive.
Sets up password protection for this archive.
- passwd
non-nullable password to set up
- returns
creator itself so that method calls can be chained
- Definition Classes
- AbstractArchiveCreator
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def towards(dst: Either[Path, OutputStream]): ArchiveCreatorBZip2
Set a destination for output archive stream, and you shouldn't reset it afterwards.
Set a destination for output archive stream, and you shouldn't reset it afterwards. Passing a
Path
results in creation of a new archive file, and passing anOutputStream
will see the flush of stream, in which case we won't close it, you have to close theOutputStream
on your own.- dst
the destination for output archive stream
- returns
creator itself so that method calls can be chained
- Definition Classes
- AbstractArchiveCreator
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated