Examples of VMChannel


Examples of gnu.java.nio.VMChannel

    throws IOException
  {
    String path = file.getPath();
    description = path;
    this.mode = mode;
    this.ch = new VMChannel();
    ch.openFile(path, mode);

    // First open the file and then check if it is a directory
    // to avoid race condition.
    if ((mode & WRITE) == 0 && file.isDirectory())
View Full Code Here

Examples of gnu.java.nio.VMChannel

}

static boolean create(String path)
  throws IOException
{
  VMChannel ch =
   VMAccessorGnuJavaNio.createUnlessExistsVMChannel(new File(path));
  if (ch == null)
   return false;
  try
  {
   ch.close();
  }
  catch (IOException e) {}
  return true;
}
View Full Code Here

Examples of gnu.java.nio.VMChannel

   *        datagram sockets
   */
  protected synchronized void create(boolean stream) throws IOException
  {
    channel = new SocketChannelImpl(false);
    VMChannel vmchannel = channel.getVMChannel();
    vmchannel.initSocket(stream);
    channel.configureBlocking(true);
    impl.getState().setChannelFD(vmchannel.getState());
    if (initialTimeout != 0)
      {
        /* Pass the timeout value to the native layer. */
        impl.setOption(SO_TIMEOUT, new Integer(initialTimeout));
        initialTimeout = 0; /* clear initial value */
 
View Full Code Here

Examples of gnu.java.nio.VMChannel

        create(true);
    if (!(impl instanceof PlainSocketImpl))
      throw new IOException("incompatible SocketImpl: "
                            + impl.getClass().getName());
    PlainSocketImpl that = (PlainSocketImpl) impl;
    VMChannel c = channel.getVMChannel().accept();
    that.impl.getState().setChannelFD(c.getState());
    that.channel = new SocketChannelImpl(c);
    that.setOption(SO_REUSEADDR, Boolean.TRUE);
    // Reset the inherited timeout.
    that.setOption(SO_TIMEOUT, Integer.valueOf(0));
View Full Code Here

Examples of gnu.java.nio.VMChannel

    progName = "";
   }
  int bufLen = getSpawnWorkBufSize0(cmdZBlock, envZBlock, cmd.length,
                env != null ? env.length : 0);
  byte[] workBuf = new byte[bufLen >= 0 ? bufLen : -1 >>> 1];
  VMChannel inCh = new VMChannel();
  VMChannel outCh = new VMChannel();
  VMChannel errCh = redirect ? null : new VMChannel();
  int[] fdsArr = { -1, -1, -1 };
  long[] pidArr = new long[1];
  boolean retrying = false;
  do
  {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.