List of usage examples for org.apache.commons.fileupload UsableMultipartStream UsableMultipartStream
public UsableMultipartStream(InputStream input, byte[] boundary)
From source file:org.httpobjects.multipart.ApacheCommonsMultipartReader.java
public ApacheCommonsMultipartReader(String contentTypeHeaderValue, InputStream representation) { try {/*from ww w .j a va 2 s .c o m*/ System.out.println(contentTypeHeaderValue); this.boundary = getBoundary(contentTypeHeaderValue); this.stream = new UsableMultipartStream(representation, boundary); if (!stream.skipPreamble()) throw new RuntimeException("Couldn't find a part to store"); } catch (IOException e) { throw new RuntimeException(e); } }