Example usage for org.apache.commons.fileupload UsableMultipartStream UsableMultipartStream

List of usage examples for org.apache.commons.fileupload UsableMultipartStream UsableMultipartStream

Introduction

In this page you can find the example usage for org.apache.commons.fileupload UsableMultipartStream UsableMultipartStream.

Prototype

public UsableMultipartStream(InputStream input, byte[] boundary) 

Source Link

Usage

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);
    }
}