/** * Returns an input stream, which may be used to * read the items contents. * * @return Opened input stream. * @throws IOException An I/O error occurred. */ public InputStream openStream() throws IOException { if (opened) { throw new IllegalStateException( "The stream was already opened."); } if (((Closeable) stream).isClosed()) { throw new FileItemStream.ItemSkippedException(); } return stream; }
/** * Returns an input stream, which may be used to read the items * contents. * * @return Opened input stream. * @throws IOException An I/O error occurred. */ public InputStream openStream() throws IOException { if (opened) { throw new IllegalStateException("The stream was already opened."); } if (((Closeable) stream).isClosed()) { throw new FileItemStream.ItemSkippedException(); } return stream; }