Example usage for java.io FileDescriptor FileDescriptor

List of usage examples for java.io FileDescriptor FileDescriptor

Introduction

In this page you can find the example usage for java.io FileDescriptor FileDescriptor.

Prototype

public FileDescriptor() 

Source Link

Document

Constructs an (invalid) FileDescriptor object.

Usage

From source file:Main.java

public static void main(String args[]) {
    FileDescriptor fd = new FileDescriptor();
    System.out.println(fd.hashCode());
}

From source file:Main.java

public static void main(String[] args) {
    System.setProperty("java.security.policy", "file:/C:/java.policy");

    SecurityManager sm = new Main();

    System.setSecurityManager(sm);

    FileDescriptor fd = new FileDescriptor();
    sm.checkRead(fd);//from  www .  ja  v a 2  s  . c  o  m

    System.out.println("Allowed!");
}

From source file:Main.java

public static void main(String[] args) {

    System.setProperty("java.security.policy", "file:/C:/java.policy");

    SecurityManager sm = new Main();

    System.setSecurityManager(sm);

    FileDescriptor fd = new FileDescriptor();
    sm.checkWrite(fd);//from w  w  w .  ja  va2 s.  c o  m

    System.out.println("Allowed!");
}

From source file:org.teavm.libgdx.plugin.AssetsCopier.java

private void processFile(File file, FileDescriptor desc) {
    desc.setName(file.getName());/* ww w.ja  va2  s  . c o m*/
    desc.setDirectory(file.isDirectory());
    if (file.isDirectory()) {
        for (File child : file.listFiles()) {
            FileDescriptor childDesc = new FileDescriptor();
            processFile(child, childDesc);
            desc.getChildFiles().add(childDesc);
        }
    }
}