import java.io.BufferedReader; import java.io.DataInputStream; import java.io.Externalizable; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectOutputStream; public class PGM implements Externalizable{ String magicnumber; int breite; int hoehe ; int lichtintens; int r; //lichtintensität byte matrix[][] ; public PGM(){} public PGM(String magicnumber,int breite,int hoehe,int lichtintens,byte matrix[][]) { this.magicnumber = magicnumber; this.breite= breite; this.hoehe = hoehe; this.lichtintens = lichtintens; this.matrix = matrix; } String writeMatrix() { String str = ""; for(int a =0;a