Examples of VirtualFilePartSource


Examples of org.codinjutsu.tools.jenkins.model.VirtualFilePartSource

            int i = 0;
            for(String key: files.keySet()) {
                VirtualFile virtualFile = files.get(key);
                parts.add(new StringPart("name", key));
                parts.add(new StringPart("json", "{\"parameter\":{\"name\":\"" + key + "\",\"file\":\""+ String.format("file%d", i) +"\"}}"));
                parts.add(new FilePart(String.format("file%d", i), new VirtualFilePartSource(virtualFile)));
                i++;
            }
            post.setRequestEntity(new MultipartRequestEntity(parts.toArray(new Part[parts.size()]), post.getParams()));
            files.clear();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.