package basics.filesystem.serializer;

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface Serializer {

	public abstract boolean openForWriting(File file);

	public abstract boolean openForReading(File file);

	public abstract void close();

	public abstract boolean canRead();

	public abstract boolean canWrite();

	public abstract void write(int value) throws IOException;

	public abstract int readInt() throws IOException;

	public abstract void write(long value) throws IOException;

	public abstract long readLong() throws IOException;

	public abstract void write(double value) throws IOException;

	public abstract double readDouble() throws IOException;

	public abstract void write(String value) throws IOException;

	public abstract String readString() throws IOException;

	public abstract void writeRaw(String value) throws IOException;

	public abstract String readStringRaw() throws IOException;

	public abstract void skipLine() throws IOException;

	public abstract void write(double[] array) throws IOException;

	public abstract double[] readDoubleArray() throws IOException;

	public abstract void write(int[] array) throws IOException;

	public abstract int[] readIntArray() throws IOException;

	public abstract void write(long[] array) throws IOException;

	public abstract long[] readLongArray() throws IOException;

    public abstract void write(List<String> list) throws IOException;

    public abstract void writeListOfStrings(List<String> list)
			throws IOException;

	public abstract List<String> readStringList() throws IOException;

	public abstract void write(Map<String, String> map) throws IOException;

	public abstract Map<String,String> readStringMap() throws IOException;
}