All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bigdata.rawstore.IBlock Maven / Gradle / Ivy

package com.bigdata.rawstore;

import java.io.InputStream;

/**
 * An object that may be used to read or write a block from a store. In general,
 * an instance of this interface either supports read or write but not both.
 * 
 * @author Bryan Thompson
 * @version $Id$
 */
public interface IBlock {

    /**
     * The address of the block on the store.
     */
    public long getAddress();

    /**
     * The length of the block.
     */
    public int length();

    /**
     * The source from which the block's data may be read.
     * 

* Note: It is important to close() this input stream. * * @throws UnsupportedOperationException * if read is not supported. */ public InputStream inputStream(); // /** // * The sink on which the block's data may be written. // *

// * Note: It is important to flush() and close() this output stream. // * // * @throws UnsupportedOperationException // * if write is not supported. // */ // public OutputStream outputStream(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy