Package com.artipie.npm
Class TgzArchive
java.lang.Object
com.artipie.npm.TgzArchive
A .tgz archive.
- Since:
- 0.1
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTgzArchive
(String bitstring) Ctor.TgzArchive
(String bitstring, boolean encoded) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
bytes()
Obtain an archive in form of byte array.javax.json.JsonObject
Obtains package.json from archive.io.reactivex.Completable
saveToFile
(Path path) Save the archive to a file.
-
Constructor Details
-
TgzArchive
Ctor.- Parameters:
bitstring
- The archive.
-
TgzArchive
Ctor.- Parameters:
bitstring
- The archiveencoded
- Is Base64 encoded?
-
-
Method Details
-
saveToFile
Save the archive to a file.- Parameters:
path
- The path to save .tgz file at.- Returns:
- Completion or error signal.
-
bytes
public byte[] bytes()Obtain an archive in form of byte array.- Returns:
- Archive bytes
-
packageJson
public javax.json.JsonObject packageJson()Obtains package.json from archive.- Returns:
- Json object from package.json file from archive.
-