public void close() throws IOException { if (!myIsClosed) { try { if (!myIsEOF) { FixedSizeInputStream.consumeRemaining(this); } } finally { myIsEOF = true; myIsClosed = true; } } } }
length = 0; is = new FixedSizeInputStream(is, length); } else if (!hasToCloseConnection(readHeader)) { is = new FixedSizeInputStream(is, 0);
length = 0; is = new FixedSizeInputStream(is, length); } else if (!hasToCloseConnection(readHeader)) { is = new FixedSizeInputStream(is, 0);
public void close() { // just read remaining data. if (myLength > 0) { try { consumeRemaining(this); } catch (IOException e) { } } }
private InputStream createInputStream(HTTPHeader readHeader, InputStream is) throws IOException { if ("chunked".equalsIgnoreCase(readHeader.getFirstHeaderValue(HTTPHeader.TRANSFER_ENCODING_HEADER))) { is = new ChunkedInputStream(is, myCharset); } else if (readHeader.getFirstHeaderValue(HTTPHeader.CONTENT_LENGTH_HEADER) != null) { String lengthStr = readHeader.getFirstHeaderValue(HTTPHeader.CONTENT_LENGTH_HEADER); long length = 0; try { length = Long.parseLong(lengthStr); } catch (NumberFormatException nfe) { length = 0; } is = new FixedSizeInputStream(is, length); } else if (!hasToCloseConnection(readHeader)) { // no content length and no valid transfer-encoding! // consider as empty response. // but only when there is no "Connection: close" or "Proxy-Connection: close" header, // in that case just return "is". // skipData will not read that as it should also analyze "close" instruction. // return empty stream. // and force connection close? (not to read garbage on the next request). is = new FixedSizeInputStream(is, 0); // this will force connection to close. readHeader.setHeaderValue(HTTPHeader.CONNECTION_HEADER, "close"); } if ("gzip".equals(readHeader.getFirstHeaderValue(HTTPHeader.CONTENT_ENCODING_HEADER))) { is = new GZIPInputStream(is); } return myRepository.getDebugLog().createLogStream(SVNLogType.NETWORK, is); }
public void close() { // just read remaining data. if (myLength > 0) { try { consumeRemaining(this); } catch (IOException e) { } } }
if (!isDelta) { InputStream tgt = new FixedSizeInputStream(dumpStream, contentLength); checksum = getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, tgt, fsConsumer, true); } else {
public void close() { // just read remaining data. if (myLength > 0) { try { consumeRemaining(this); } catch (IOException e) { } } }
if (!isDelta) { InputStream tgt = new FixedSizeInputStream(dumpStream, contentLength); checksum = getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, tgt, fsConsumer, true); } else {
public void close() throws IOException { if (!myIsClosed) { try { if (!myIsEOF) { FixedSizeInputStream.consumeRemaining(this); } } finally { myIsEOF = true; myIsClosed = true; } } } }
if (!isDelta) { InputStream tgt = new FixedSizeInputStream(dumpStream, contentLength); checksum = getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, tgt, fsConsumer, true); } else {
public void close() throws IOException { if (!myIsClosed) { try { if (!myIsEOF) { FixedSizeInputStream.consumeRemaining(this); } } finally { myIsEOF = true; myIsClosed = true; } } } }