Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: Create a file in read / write mode

Java: Create a file in read / write mode

import java.io.File;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
public class Fichiers_Permission
  public static void main(String[] argv) throws Exception {
    File fichier = new File("test.txt");
  //  Allow reading and writing
    FileChannel write_permit = new RandomAccessFile(fichier, "rw").getChannel();
    ByteBuffer writeAndReadbuffer = write_permit.map(FileChannel.MapMode.READ_WRITE, 0, (int) write_permit

Users who found this page were searching for:

  • jpanel translucent
  • java create file and change mode

No comments yet.

Leave a Comment