code: public static synchronized Channel getChannel() throws IOException {
          if (devnull < 0) {
              devnull = open0("/dev/null", O_RDWR);
          }
  
          // If we don't have the channel try to create it
          if (!haveChannel) {
              channel = createChannel();
              haveChannel = true;
          }
  
          // if there is a channel then do the security check before
          // returning it.
          if (channel != null) {
              checkAccess(channel);
          }
          return channel;
      }
docs: /*
  Returns a Channel representing the inherited channel if the
  inherited channel is a stream connected to a network socket.