Package com.fathomdb.io

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


  @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

    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

    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

TOP

Related Classes of com.fathomdb.io.NoCloseInputStream

Copyright © 2018 www.massapicom. 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.