338339340341342343344
// decrease size by 1 to deal with this if (size != 0) size--; // set the inputStreamEntity to a copy of the input stream data inputStreamEntity = new RepeatableInputStreamRequestEntity(new ByteArrayInputStream(copy.toByteArray()), size); }
349350351352353354355
ClonedInputStream cis = new ClonedInputStream(is); is = cis; copy = cis.getOutput(); } inputStreamEntity = new RepeatableInputStreamRequestEntity(is, length); }