Record Class ZipEntrySource
java.lang.Object
java.lang.Record
cloud.opencode.base.io.compress.ZipEntrySource
- Record Components:
entryName- the entry name inside the archive | 归档内的条目名inputStream- the data source for this entry | 该条目的数据源size- declared uncompressed size, or-1if unknown | 声明的未压缩大小,-1表示未知
A streaming ZIP entry: name + content stream + optional declared size.
流式 ZIP 条目:名称 + 内容流 + 可选声明大小。
Used by ZipUtil.compressStream(java.io.OutputStream, java.util.List, ZipOptions) to
build archives entry-by-entry from arbitrary InputStream sources without staging
everything to disk first.
ZipUtil.compressStream(java.io.OutputStream, java.util.List, ZipOptions) 使用本类
由任意 InputStream 源逐条目构建归档,无需先落盘。
- Since:
- JDK 25, opencode-base-io V1.0.4
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionZipEntrySource(String entryName, InputStream inputStream, long size) Creates an instance of aZipEntrySourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theentryNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinputStreamrecord component.longsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ZipEntrySource
Creates an instance of aZipEntrySourcerecord class.- Parameters:
entryName- the value for theentryNamerecord componentinputStream- the value for theinputStreamrecord componentsize- the value for thesizerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
entryName
-
inputStream
Returns the value of theinputStreamrecord component.- Returns:
- the value of the
inputStreamrecord component
-
size
-