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

com.gc.iotools.stream.store.SeekableStore Maven / Gradle / Ivy

Go to download

EasyStream is a small set of utilities for dealing with streams (InputStreams and OutputStreams). The aim is to ease the use of pipes when they're required. Main features are: * "Convert" an OutputStream to an InputStream. * Count the number of bytes read or wrote to a given stream. * While reading the data from an InputStream copy it to a supplied OutputStream. * Read the content of an InputStream multiple times or seek to a definite position

The newest version!
package com.gc.iotools.stream.store;

/*
 * Copyright (c) 2008, 2015 Gabriele Contini. This source code is released
 * under the BSD License.
 */

import java.io.EOFException;
import java.io.IOException;

/**
 * 

* Represents a Store that can be seeked to a random position. *

*

* All the data passed to this store must be remembered until * {@link #cleanup()} is invoked, in case a {@link #seek(long)} repositions on * pa previously read data. *

* * @author dvd.smnt * @since 1.2.0 * @see Store * @version $Id: SeekableStore.java 576 2015-03-28 00:03:33Z gcontini $ */ public interface SeekableStore extends Store { /** * Reposition this Store on a previously read position. * * @param position * position to read the data from. * @throws java.io.IOException * If some error in the internal store happens. * @throws EOFException * If a position is greater than the actual Store * size. */ void seek(long position) throws IOException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy