package IngressoUscita;
import java.io.*;
public class BinFileScrittura
{	private DataOutputStream uscita;
	public BinFileScrittura(String s)
	{	try 
		{	uscita = new DataOutputStream(new FileOutputStream(s));	}
		catch (IOException e) { e.getMessage();	}
	}
	public void scriviBooleano(boolean b)
	{	try { uscita.writeBoolean(b); }
		catch (IOException e) { e.getMessage();	}
	}
	public void scriviByte(byte b)
	{	try { uscita.writeByte(b); }
		catch (IOException e) { e.getMessage();	}
	}
	public void scriviCarattere(char c)
	{	try { uscita.writeChar(c); }
		catch (IOException e) { e.getMessage();	}
	}
	public void scriviIntero(int i)
	{	try { uscita.writeInt(i); }
		catch (IOException e) { e.getMessage();	}
	}
	public void scriviReale(double d) 
	{	try { uscita.writeDouble(d); }
		catch (IOException e) { e.getMessage();	}
	}
	public void scriviStringaUTF(String s)
	{	try { uscita.writeUTF(s); }
		catch (IOException e) { e.getMessage();	}
	}
	public void chiudi()
	{	try { uscita.close();	}
		catch (IOException e) { e.getMessage();	}
	}	
}
