Examples of binary()


Examples of com.jcabi.http.Response.binary()

                    .assertStatus(HttpURLConnection.HTTP_OK)
                    .assertHeader(HttpHeaders.CONTENT_ENCODING, "gzip");
            MatcherAssert.assertThat(
                IOUtils.toString(
                    new GZIPInputStream(
                        new ByteArrayInputStream(resp.binary())
                    ),
                    Charsets.UTF_8
                ),
                Matchers.is(body)
            );
View Full Code Here

Examples of htsjdk.samtools.util.ftp.FTPClient.binary()

                    throw new RuntimeException("Login failure for host: " + host);
                }
            }
        }

        reply = ftp.binary();
        if (!(reply.isSuccess())) {
            throw new RuntimeException("Could not set binary mode on host: " + host);
        }

        return ftp;
View Full Code Here

Examples of org.flowforwarding.warp.protocol.ofp.avro.OFMessage.binary()

                    OFMessage helloMsg = builder.type("ofp_hello").build();
                    byte[] v = {127,127,127,127};
                    helloMsg.get("header").get("xid").set(v);

                    //getSender().tell(TcpMessage.write(ByteString.fromArray(builder.type("ofp_hello").build().binary())), getSelf());
                    getSender().tell(TcpMessage.write(ByteString.fromArray(helloMsg.binary())), getSelf());
                    this.state = State.CONNECTED;
                    log.info ("STATE: Connected to OF Switch version "+ builder.version());
//                    getSender().tell(TcpMessage.write(ByteString.fromArray(builder.type("ofp_switch_features_request").set("xid", "0xabba").build().binary())), getSelf());
                    getSender().tell(TcpMessage.write(ByteString.fromArray(builder.type("ofp_switch_features_request").build().binary())), getSelf());
View Full Code Here

Examples of sos.net.SOSFTP.binary()

      if (passiveMode)
        ftpClient.passive();
      if (transferMode.equalsIgnoreCase("ascii")) {
        ftpClient.ascii();
      } else {
        ftpClient.binary();
      }

      if (!remoteDir.equals(""))
        ftpClient.cd(remoteDir);
      ftpClient.cwd(localDir);
View Full Code Here

Examples of sos.net.SOSFTP.binary()

            if(logtext != nulllogtext.append("..ftp server reply [ascii]: "  + ftpClient.getReplyString());
          } else {
            throw new Exception(".. could not switch to ASCII mode for file transfer ..ftp server reply [ascii]: "  + ftpClient.getReplyString());
          }
        } else {
          if (sosftp.binary()) {               
            if(logtext != nulllogtext.append("using binary mode for file transfers.");
            if(logtext != nulllogtext.append("..ftp server reply [binary]: "  + ftpClient.getReplyString());
          } else {
            throw new Exception(".. could not switch to binary mode for file transfer ..ftp server reply [ascii]: "  + ftpClient.getReplyString());
          }
View Full Code Here

Examples of sos.net.SOSFTP.binary()

              throw new RuntimeException(".. could not switch to ASCII mode for file transfer ..ftp server reply [ascii]: "
                  + ftpClient.getReplyString());
            }
          }
          else {
            if (sosftp.binary()) {
              this.getLogger().debug("using binary mode for file transfers.");
              this.getLogger().debug("..ftp server reply" + " [binary]: " + ftpClient.getReplyString());
            }
            else {
              throw new RuntimeException(".. could not switch to binary mode for file transfer ..ftp server reply [ascii]: "
View Full Code Here

Examples of sos.net.SOSFTP.binary()

            else {
              throw new Exception(".. could not switch to ASCII mode for file transfer ..ftp server reply [ascii]: " + ftpClient.getReplyString());
            }
          }
          else {
            if (sosftp.binary()) {
              this.getLogger().debug("using binary mode for file transfer");
              this.getLogger().debug("..ftp server reply [binary]: " + ftpClient.getReplyString());
            }
            else {
              throw new Exception(".. could not switch to binary mode for file transfer .. ftp server reply [ascii]: "
View Full Code Here

Examples of sun.net.ftp.FtpClient.binary()

      throws IOException, UnserializationException
  {
    FtpURL ftpURL  = new FtpURL(urlString);
    FtpClient ftpClient = new FtpClient(ftpURL.host);
    ftpClient.login(ftpURL.user,ftpURL.pass);
    ftpClient.binary();
    ftpClient.cd(ftpURL.dir);

    BufferedReader reader;
    Any result;
View Full Code Here

Examples of sun.net.ftp.FtpClient.binary()

      throws IOException, UnserializationException
  {
    FtpURL  ftpURL = new FtpURL(urlString);
    FtpClient ftpClient = new FtpClient(ftpURL.host);
    ftpClient.login(ftpURL.user,ftpURL.pass);
    ftpClient.binary();
    ftpClient.cd(ftpURL.dir);

    BufferedWriter writer;
    Any result;
View Full Code Here

Examples of sun.net.ftp.FtpClient.binary()

      throws IOException, UnserializationException
  {
    FtpURL  ftpURL  = new FtpURL(urlString);
    FtpClient ftpClient = new FtpClient(ftpURL.host);
    ftpClient.login(ftpURL.user,ftpURL.pass);
    ftpClient.binary();
    ftpClient.cd(ftpURL.dir);

    BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(ftpClient.put(ftpURL.file)));
    writer.write(string);
    writer.close();
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.