Code Search for Developers
 
 
  

EntryInputStream.java from Kneobase at Krugle


Show EntryInputStream.java syntax highlighted

/*
 * Created on 01/11/2004
 *
 */
package com.kneobase.driver.compressed;

import java.io.IOException;
import java.io.InputStream;

/**
 * @author Ernesto De Santis
 *
 */
public class EntryInputStream extends InputStream {

    private InputStream inputStream;
    private long entrySize;
    private long readed = 0;

    public EntryInputStream(InputStream inputStream, long entrySize) {
        this.inputStream = inputStream;
        this.entrySize = entrySize;
    }

    /* (non-Javadoc)
     * @see java.io.InputStream#read()
     */
    public int read() throws IOException {
        if(readed < entrySize)
            return inputStream.read();
        else
            return -1;
    }

}




See more files for this project here

Kneobase

Kneobase is an enterprise search engine, based upon the Lucene search engine and the Spring framework. It allows to perform full-text search across many different content sources. It is highly adaptable out-of-the-box and has a pluggable architecture.

Project homepage: http://sourceforge.net/projects/kneobase
Programming language(s): Java,XML
License: other

  A_CompressedCompositeAdapter.java
  A_EntryAdapter.java
  CompressedIterator.java
  EntryInputStream.java
  I_CompressedCompositeAdapter.java
  I_EntryAdapter.java