/[classpath]/classpath/gnu/java/nio/channels/FileChannelImpl.java
ViewVC logotype

Diff of /classpath/gnu/java/nio/channels/FileChannelImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by mark, Mon Jul 11 17:27:55 2005 UTC revision 1.16 by rabbit78, Mon Jul 25 13:57:40 2005 UTC
# Line 73  public final class FileChannelImpl exten Line 73  public final class FileChannelImpl exten
73    public static final int SYNC   = 16;    public static final int SYNC   = 16;
74    public static final int DSYNC  = 32;    public static final int DSYNC  = 32;
75    
76      public static FileChannelImpl in;
77      public static FileChannelImpl out;
78      public static FileChannelImpl err;
79    
80    private static native void init();    private static native void init();
81    
82    static    static
# Line 83  public final class FileChannelImpl exten Line 87  public final class FileChannelImpl exten
87        }        }
88            
89      init();      init();
90    
91        in  = new FileChannelImpl(0,READ);
92        out = new FileChannelImpl(1,WRITE);
93        err = new FileChannelImpl(2,WRITE);
94    }    }
95    
96    /**    /**
# Line 130  public final class FileChannelImpl exten Line 138  public final class FileChannelImpl exten
138        }        }
139    }    }
140    
141    /* Used by init() (native code) */    /**
142       * Constructor for default channels in, out and err.
143       *
144       * Used by init() (native code).
145       *
146       * @param fd the file descriptor (0, 1, 2 for stdin, stdout, stderr).
147       *
148       * @param mode READ or WRITE
149       */
150    FileChannelImpl (int fd, int mode)    FileChannelImpl (int fd, int mode)
151    {    {
152      this.fd = fd;      this.fd = fd;
153      this.mode = mode;      this.mode = mode;
154    }    }
155    
   public static FileChannelImpl in;  
   public static FileChannelImpl out;  
   public static FileChannelImpl err;  
   
156    private native int open (String path, int mode) throws FileNotFoundException;    private native int open (String path, int mode) throws FileNotFoundException;
157    
158    public native int available () throws IOException;    public native int available () throws IOException;

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26