import java.io.*;

final class EinAus{

private static File ausDatei;
private static FileOutputStream ausStream    = null;
private static DataOutputStream ausgabeDaten = null;

public static boolean initAusgabe(String s){
     ausDatei = new File(s+".txt");
     try {
         ausStream    = new FileOutputStream(ausDatei);
         ausgabeDaten = new DataOutputStream(ausStream);
         }
     catch (IOException e) { 
        System.out.println("Fehler - beim Öffnen der Dateien..");
        return false; 
        }
    return true;
    }

public static void endeAusgabe() {
    if (ausStream != null) try { ausStream.close();}
    catch (IOException e) { return; }
    }


public static void writeP(String s){
    try { ausgabeDaten.writeBytes(s);}
    catch (IOException e) { System.out.print(s); }
    }

public static void writeLnP(){
    writeP("\r\n");
    }

public static void writeLnP(String s){
    writeP(s+"\r\n");
    }
}