Examples of NoCloseInputStream


Examples of com.fathomdb.io.NoCloseInputStream

        InputStream is = null;
        try {
          if (configFile.equals("-")) {
            // Read from stdin
            // Don't auto-close it, and that terminates nailgun
            is = new NoCloseInputStream(System.in);
          } else {
            if (isServerMode()) {
              throw new IllegalArgumentException("Must pass config file over stdin in server mode");
            }
            File file = IoUtils.resolve(configFile);
View Full Code Here

Examples of com.fathomdb.io.NoCloseInputStream

  @Override
  public Object runCommand() throws PlatformLayerClientException, JSONException {
    PlatformLayerClient client = getPlatformLayerClient();

    if (json == null) {
      InputStream stream = new NoCloseInputStream(System.in);
      byte[] data;
      try {
        data = ByteStreams.toByteArray(stream);

        json = new String(data, Charsets.UTF_8);
View Full Code Here

Examples of com.fathomdb.io.NoCloseInputStream

    if (stdin) {
      if (value != null) {
        throw new CliException("You cannot specify a value when using -stdin");
      }

      InputStream stream = new NoCloseInputStream(System.in);
      byte[] data = ByteStreams.toByteArray(stream);

      if ("base64".equals(format)) {
        value = Base64.encode(data);
      } else {
View Full Code Here

Examples of com.fathomdb.io.NoCloseInputStream

    InputStream is = null;
    try {
      if (configFile.equals("-")) {
        // Read from stdin
        // Don't auto-close it: that terminates nailgun
        is = new NoCloseInputStream(System.in);
      } else {
        if (isServerMode()) {
          throw new IllegalArgumentException("Must pass config file over stdin in server mode");
        }
        File file = IoUtils.resolve(configFile);
View Full Code Here

Examples of io.apigee.trireme.core.internal.NoCloseInputStream

                int fd = getStdioFD(opts);
                if (fd != 0) {
                    throw new AssertionError("stdin only supported on fd 0");
                }
                log.debug("Using standard input for script input");
                sandbox.setStdin(new NoCloseInputStream(parent.runner.getStdin()));

            } else if (STDIO_IGNORE.equals(type)) {
                // Just create a dummy stream in case someone needs to read from it
                sandbox.setStdin(new BitBucketInputStream());
View Full Code Here

Examples of nexj.core.util.NoCloseInputStream

         response.setValue(TCPSender.CHANNEL, m_channel.getName());

         if (mis.next(response))
         {
            // get body
            BufferedInputStream bufStream = new BufferedInputStream(new NoCloseInputStream(mis));
            Object body;

            if (m_channel.getEncoding() != null)
            {
               String sEncoding = m_channel.getEncoding().toLowerCase(Locale.ENGLISH);
View Full Code Here

Examples of nexj.core.util.NoCloseInputStream

                  if (miStream.next(tobj))
                  {
                     Object body;

                     // get body
                     InputStream bufStream = new BufferedInputStream(new NoCloseInputStream(miStream));

                     if (m_channel.getEncoding() != null)
                     {
                        String sEncoding = m_channel.getEncoding();
                        Reader ireader = new BufferedReader(new InputStreamReader(
View Full Code Here

Examples of nexj.core.util.NoCloseInputStream

         if (!istream.markSupported())
         {
            istream = new BufferedInputStream(istream);
         }

         istream = new NoCloseInputStream(istream);
      }

      for (int i = 0; i < sClassNameArray.length; ++i)
      {
         if (bReset)
View Full Code Here

Examples of org.apache.sshd.common.util.NoCloseInputStream

            }
            ClientChannel channel;
            if (command == null) {
                channel = session.createChannel(ClientChannel.CHANNEL_SHELL);
                ((ChannelShell) channel).setAgentForwarding(agentForward);
                channel.setIn(new NoCloseInputStream(System.in));
            } else {
                channel = session.createChannel(ClientChannel.CHANNEL_EXEC);
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                Writer w = new OutputStreamWriter(baos);
                for (String cmd : command) {
View Full Code Here

Examples of org.apache.sshd.common.util.NoCloseInputStream

        ClientChannel channel;
        if (command == null) {
            channel = session.createChannel(ClientChannel.CHANNEL_SHELL);
            ((ChannelShell) channel).setAgentForwarding(agentForward);
            channel.setIn(new NoCloseInputStream(System.in));
        } else {
            channel = session.createChannel(ClientChannel.CHANNEL_EXEC);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            Writer w = new OutputStreamWriter(baos);
            for (String cmd : command) {
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.