@Override public InputStream getStream() throws IOException { if (Edition.CURRENT != Edition.GWT) { final InputStream result = this.stream; setStream(null); return result; } return this.stream; }
@Override public InputStream getStream() throws IOException { // if (Edition.CURRENT != Edition.GWT) { final InputStream result = this.stream; setStream(null); return result; // } // // return this.stream; }
/** * Constructor. * * @param inputStream * The representation's stream. * @param mediaType * The representation's media type. * @param expectedSize * The expected input stream size. */ public InputRepresentation(InputStream inputStream, MediaType mediaType, long expectedSize) { super(mediaType); setSize(expectedSize); setTransient(true); setStream(inputStream); }
/** * Constructor. * * @param inputStream * The representation's stream. * @param mediaType * The representation's media type. * @param expectedSize * The expected input stream size. */ public InputRepresentation(InputStream inputStream, MediaType mediaType, long expectedSize) { super(mediaType); setSize(expectedSize); setTransient(true); setStream(inputStream); }