Search in sources :

Example 6 with Part

use of org.glassfish.api.admin.Payload.Part in project Payara by payara.

the class CheckpointHelper method writePartsTo.

// ZipPayloadImpl
private void writePartsTo(Iterator<Part> parts, OutputStream os) throws IOException {
    ZipOutputStream zos = new ZipOutputStream(os);
    while (parts.hasNext()) {
        Part part = parts.next();
        prepareEntry(part, zos);
        part.copy(zos);
        zos.closeEntry();
    }
    zos.close();
}
Also used : ZipOutputStream(java.util.zip.ZipOutputStream) Part(org.glassfish.api.admin.Payload.Part)

Aggregations

Part (org.glassfish.api.admin.Payload.Part)6 File (java.io.File)3 URI (java.net.URI)2 Test (org.junit.Test)2 BufferedWriter (java.io.BufferedWriter)1 FileInputStream (java.io.FileInputStream)1 FileOutputStream (java.io.FileOutputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 Writer (java.io.Writer)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Map (java.util.Map)1 Properties (java.util.Properties)1 ZipOutputStream (java.util.zip.ZipOutputStream)1 ParameterMap (org.glassfish.api.admin.ParameterMap)1 Payload (org.glassfish.api.admin.Payload)1 Inbound (org.glassfish.api.admin.Payload.Inbound)1