Examples of FixedSizeInputStream


Examples of org.terrier.utility.FixedSizeInputStream

 

  /** Get the document object representing the current document. */
  public Document getDocument()
  {
    FixedSizeInputStream fsis = new FixedSizeInputStream(is, currentDocumentBlobLength);
    fsis.suppressClose();
    Document rtr;
    try {
      rtr = documentClass.getConstructor(InputStream.class, Map.class, Tokeniser.class).newInstance(fsis, DocProperties, tokeniser);
    } catch (Exception e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of org.terrier.utility.FixedSizeInputStream

  }

  /** Get the document object representing the current document. */
  public Document getDocument()
  {
    FixedSizeInputStream fsis = new FixedSizeInputStream(is, currentDocumentBlobLength);
    fsis.suppressClose();
    Document rtr;
    try {
      rtr = documentClass.getConstructor(InputStream.class, Map.class, Tokeniser.class).newInstance(fsis, DocProperties, tokeniser);
    } catch (Exception e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.FixedSizeInputStream

            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))) {
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.FixedSizeInputStream

            if (contentLength == 0) {
                getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, SVNFileUtil.DUMMY_IN, fsConsumer, false);
            } else {
                if (!isDelta) {
                    //
                    InputStream tgt = new FixedSizeInputStream(dumpStream, contentLength);
                    getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, tgt, fsConsumer, false);
                } else {
                    buffer = new byte[SVNFileUtil.STREAM_CHUNK_SIZE];
                    SVNDeltaReader deltaReader = null;
                    try {
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.FixedSizeInputStream

            if (contentLength == 0) {
                getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, SVNFileUtil.DUMMY_IN, fsConsumer, false);
            } else {
                if (!isDelta) {
                    //
                    InputStream tgt = new FixedSizeInputStream(dumpStream, contentLength);
                    checksum = getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, tgt, fsConsumer, true);
                } else {
                    buffer = new byte[SVNFileUtil.STREAM_CHUNK_SIZE];
                    SVNDeltaReader deltaReader = null;
                    try {
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.FixedSizeInputStream

            if (contentLength == 0) {
                getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, SVNFileUtil.DUMMY_IN, fsConsumer, false);
            } else {
                if (!isDelta) {
                    //
                    InputStream tgt = new FixedSizeInputStream(dumpStream, contentLength);
                    getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, tgt, fsConsumer, false);
                } else {
                    buffer = new byte[SVNFileUtil.STREAM_CHUNK_SIZE];
                    SVNDeltaReader deltaReader = null;
                    try {
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.FixedSizeInputStream

            if (contentLength == 0) {
                getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, SVNFileUtil.DUMMY_IN, fsConsumer, false);
            } else {
                if (!isDelta) {
                    //
                    InputStream tgt = new FixedSizeInputStream(dumpStream, contentLength);
                    getDeltaGenerator().sendDelta(myCurrentNodeBaton.myPath, tgt, fsConsumer, false);
                } else {
                    buffer = new byte[SVNFileUtil.STREAM_CHUNK_SIZE];
                    SVNDeltaReader deltaReader = null;
                    try {
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.FixedSizeInputStream

            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))) {
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.FixedSizeInputStream

            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))) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.