String s = fs.createTempFile(fsBase + "/tmp", ".tmp", false, false);
OutputStream out = fs.openFileOutputStream(s, false);
byte[] buffer = new byte[len];
out.write(buffer);
out.close();
out = fs.openFileOutputStream(s, true);
out.write(1);
out.close();
InputStream in = fs.openFileInputStream(s);
for (int i = 0; i < len; i++) {
assertEquals(0, in.read());