Package org.nuxeo.ecm.core.utils
Class BlobUtils
- java.lang.Object
-
- org.nuxeo.ecm.core.utils.BlobUtils
-
public class BlobUtils extends Object
Blob utility methods.- Since:
- 9.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlobUtils.ZIP_ENTRY_ENCODING_OPTIONS
-
Field Summary
Fields Modifier and Type Field Description static StringZIP_ENTRY_ENCODING_PROPERTY
-
Constructor Summary
Constructors Constructor Description BlobUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static StringescapeEntryPath(String path)protected static StringgetFileName(Blob blob)static Blobzip(List<Blob> blobs, String fileName)Zip a list of blob.protected static voidzip(List<Blob> blobs, ZipOutputStream out)static Blobzip(Blob blob, String filename)Zip the given blob.protected static voidzip(Blob blob, ZipOutputStream out)
-
-
-
Field Detail
-
ZIP_ENTRY_ENCODING_PROPERTY
public static final String ZIP_ENTRY_ENCODING_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
zip
public static Blob zip(Blob blob, String filename) throws IOException
Zip the given blob.- Parameters:
blob- the blobfilename- if no filename is given, the blob's filename will be used- Returns:
- a zip containing the blob
- Throws:
IOException
-
zip
protected static void zip(Blob blob, ZipOutputStream out) throws IOException
- Throws:
IOException
-
zip
public static Blob zip(List<Blob> blobs, String fileName) throws IOException
Zip a list of blob.- Parameters:
blobs- the blob listfileName- if no filename is given, the first blob's filename will be used- Returns:
- a zip containing the list of blob
- Throws:
IOException
-
zip
protected static void zip(List<Blob> blobs, ZipOutputStream out) throws IOException
- Throws:
IOException
-
-