package org.ourfilesystem.com;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import net.i2p.client.streaming.I2PSocket;

public class OFSI2PSocket implements OFSSocket {

	I2PSocket Socket;
	
	public OFSI2PSocket(I2PSocket s) {
		Socket = s;
	}
	
	@Override
	public InputStream getInputStream() throws IOException {
		return Socket.getInputStream();
	}

	@Override
	public OutputStream getOutputStream() throws IOException {
		return Socket.getOutputStream();
	}

	@Override
	public boolean isConnected() {
		return !Socket.isClosed();
	}

	@Override
	public boolean isClosed() {
		return Socket.isClosed();
	}

	@Override
	public void close() throws IOException {
		Socket.close();
	}

}
