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 class
BlobUtils.ZIP_ENTRY_ENCODING_OPTIONS
-
Field Summary
Fields Modifier and Type Field Description static String
ZIP_ENTRY_ENCODING_PROPERTY
-
Constructor Summary
Constructors Constructor Description BlobUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static String
escapeEntryPath(String path)
protected static String
getFileName(Blob blob)
static Blob
zip(List<Blob> blobs, String fileName)
Zip a list of blob.protected static void
zip(List<Blob> blobs, ZipOutputStream out)
static Blob
zip(Blob blob, String filename)
Zip the given blob.protected static void
zip(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
-
-