<commit_before>/*
 ** 2013 December 28
 **
 ** The author disclaims copyright to this source code.  In place of
 ** a legal notice, here is a blessing:
 **    May you do good and not evil.
 **    May you find forgiveness for yourself and forgive others.
 **    May you share freely, never taking more than you give.
 */
package info.ata4.util.io;

import java.io.IOException;

/**
 * Interface for IO classes that provide random access.
 * 
 * @author <NAME> <barracuda415 at yahoo.de>
 */
public interface Seekable {

    /**
     * Seek to the specified position.
     * 
     * @param where The position to seek to.
     * @throws IOException 
     */
    public void seek(long where) throws IOException;

    /**
     * Obtain the current position.
     * 
     * @return
     * @throws IOException 
     */
    public long tell() throws IOException;
    
    /**
     * Returns the total capacity in bytes.
     * 
     * @return
     * @throws IOException 
     */
    public long length() throws IOException;
    
    /**
     * Returns amount of remaining bytes that are available for reading.
     * 
     * @return
     * @throws IOException 
     */
    public long remaining() throws IOException;

    /**
     * Return true if there are remaining bytes to read.
     * 
     * @return
     * @throws IOException 
     */
    public boolean hasRemaining() throws IOException;
}<commit_msg>Updated comment, the methods work with both of course<commit_after>/*
 ** 2013 December 28
 **
 ** The author disclaims copyright to this source code.  In place of
 ** a legal notice, here is a blessing:
 **    May you do good and not evil.
 **    May you find forgiveness for yourself and forgive others.
 **    May you share freely, never taking more than you give.
 */
package info.ata4.util.io;

import java.io.IOException;

/**
 * Interface for IO classes that provide random access.
 * 
 * @author <NAME> <barracuda415 at yahoo.de>
 */
public interface Seekable {

    /**
     * Seek to the specified position.
     * 
     * @param where The position to seek to.
     * @throws IOException 
     */
    public void seek(long where) throws IOException;

    /**
     * Obtain the current position.
     * 
     * @return
     * @throws IOException 
     */
    public long tell() throws IOException;
    
    /**
     * Returns the total capacity in bytes.
     * 
     * @return
     * @throws IOException 
     */
    public long length() throws IOException;
    
    /**
     * Returns amount of remaining bytes that are available for reading or
     * writing.
     * 
     * @return
     * @throws IOException 
     */
    public long remaining() throws IOException;

    /**
     * Return true if there are remaining bytes to read or write.
     * 
     * @return
     * @throws IOException 
     */
    public boolean hasRemaining() throws IOException;
}
{'fraction_non_alphanumeric': 0.08992680376437784, 'fraction_numerical': 0.006971070059254096, 'mean_word_length': 2.213885778275476, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2538301', 'n_tokens_mistral': 799, 'n_tokens_neox': 749, 'n_words': 310}