1 /******************************************************************************* 2 * Copyright (c) 2011, 2013 EclipseSource and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * EclipseSource - initial API and implementation 10 ******************************************************************************/ 11 package org.eclipse.rap.fileupload; 12 13 import java.io.IOException; 14 import java.io.InputStream; 15 16 17 /** 18 * Instances of this interface are responsible for reading and processing the data from a file 19 * upload. 20 */ 21 public abstract class FileUploadReceiver { 22 23 /** 24 * Reads and processes all data from the provided input stream. 25 * 26 * @param stream the stream to read from 27 * @param details the details of the uploaded file like file name, content-type and size 28 * @throws IOException if an input / output error occurs 29 */ 30 public abstract void receive( InputStream stream, FileDetails details ) throws IOException; 31 32 }