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

com.github.simbo1905.srs.RandomAccessFileInterface Maven / Gradle / Ivy

There is a newer version: 1.0.0-RC6
Show newest version
package com.github.simbo1905.srs;

import java.io.IOException;

/*
 * easier to mock final native class by wrapping it in an interface
 */
interface RandomAccessFileInterface {

	/**
	 * Forces the file data to be flushed. This won't use flags to flush file meta-data.
	 * @throws IOException
	 */
	void fsync() throws IOException;

	long getFilePointer() throws IOException;

	int hashCode();

	boolean equals(Object obj);

	String toString();

	int read(byte[] b) throws IOException;

	void readFully(byte[] b) throws IOException;

	void write(int b) throws IOException;

	void write(byte[] b) throws IOException;

	void write(byte[] b, int off, int len) throws IOException;

	void seek(long pos) throws IOException;

	long length() throws IOException;

	void setLength(long newLength) throws IOException;

	void close() throws IOException;

	byte readByte() throws IOException;

	int readInt() throws IOException;

	long readLong() throws IOException;

	void writeInt(int v) throws IOException;

	void writeLong(long v) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy