/** * Closes the this payload stream, skipping unread bytes in the process. * @throws IOException I/O exception in closing process */ public void close() throws IOException { if (!bClosed) { if (md != null) { // Skip remaining unread bytes to ensure payload is completely // digested. Skipping because the DigestInputStreamNoSkip // has been altered to read when skipping. while (in_digest.skip(totalLength) > 0) { } } if (in_pb != null) { in_pb.close(); in_pb = null; } bClosed = true; } }
/** * Closes the this payload stream, skipping unread bytes in the process. * @throws IOException if an I/O error occurs in the closing process */ public void close() throws IOException { if (!bClosed) { if (payloadHeaderWrapped != null) { payloadHeaderWrapped.close(); } if (md != null) { // Skip remaining unread bytes to ensure payload is completely // digested. Skipping because the DigestInputStreamNoSkip // has been altered to read when skipping. while (in_digest.skip(length) > 0) { } } if (in_buffered != null) { in_buffered.close(); in_buffered = null; } if (onClosedHandler != null) { onClosedHandler.payloadClosed(); onClosedHandler = null; } bClosed = true; } }