public static void WriteAllBytes(string path, byte[] value) { try { var stream = new global::java.io.RandomAccessFile(path, "rw"); stream.setLength(0); stream.write((sbyte[])(object)value); stream.close(); } catch { throw; } }