Ich schreibe in einen Framebuffer, der sich auf "/dev/fb0" befindet. Alles funktioniert gut, bis ich versuche, mit einem OutputStream erneut in die Pipe zu schreiben, was das Programm zum Stillstand bringt. Ich habe das Problem gelöst, indem ich den OutputStream geschlossen und dann neu erstellt habe, aber das scheint furchtbar langsam und stumpf zu sein.
Framebuffer.java
`public class Framebuffer extends Autobuffer { private FileOutputStream out = null; private File pipe = null;
public Framebuffer() {
super(320, 240);
}
public Framebuffer(File pipe) {
super(320, 240);
try {
out = new FileOutputStream(pipe);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
this.pipe = pipe;
}
public void sync() throws IOException {
out.write(getBytes());
out.close();
out = new FileOutputStream(pipe);
}
}`
Irgendwelche Ideen?
Gracias.