Examples of writeString()


Examples of be.bagofwords.util.WrappedSocketConnection.writeString()

    @Override
    public InputStream createInputStream() {
        try {
            WrappedSocketConnection connection = new WrappedSocketConnection(host, port);
            connection.writeByte((byte) RemoteFileServer.Action.INPUT_STREAM.ordinal());
            connection.writeString(relPath.getPath());
            connection.flush();
            long answer = connection.readLong();
            if (answer == BaseServer.LONG_OK) {
                return connection.getIs();
            } else {
View Full Code Here

Examples of bear.plugins.sh.SystemSession.writeString()

    public CommandLineResult<?> runScript(SessionRunner runner, String sql, String user, final String pw) {
        final String filePath = runner.$(mysqlTempScriptPath);

        final SystemSession sys = runner.$().sys;

        sys.writeString(sql).toPath(filePath).run();

        return sys.sendCommand(sys.line().stty().a("mysql", "-u", user, "-p").redirectFrom(filePath));
    }

    public static ConsoleCallback passwordCallback(final String pw) {
View Full Code Here

Examples of bm.core.io.SerializerOutputStream.writeString()

            final ChecksumedOutputStream cos = new ChecksumedOutputStream( dos );
            final DataOutputStream dos2 = new DataOutputStream( cos );
            final SerializerOutputStream out = new SerializerOutputStream( dos2 );
            out.writeByte( VERSION );
            out.writeByte( (byte) (encrypted ? 1 : 0) );
            out.writeString( Net.getDeviceGuid() != null ? Net.getDeviceGuid() : "" );
            out.writeLong( Net.getDeviceId() != null ? Net.getDeviceId().longValue() : 0 );
            serialize( out );
            final long crc  = cos.getCRC();
            out.writeString( "END_OF_DATA" );
            out.writeLong( crc );
View Full Code Here

Examples of ch.ethz.ssh2.packets.TypesWriter.writeString()

  private final void closeHandle(byte[] handle) throws IOException
  {
    int req_id = generateNextRequestID();

    TypesWriter tw = new TypesWriter();
    tw.writeString(handle, 0, handle.length);

    sendMessage(Packet.SSH_FXP_CLOSE, req_id, tw.getBytes());

    expectStatusOKMessage(req_id);
  }
View Full Code Here

Examples of co.cask.cdap.common.io.BinaryEncoder.writeString()

    }
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    Encoder encoder = new BinaryEncoder(bos);
    encoder.writeInt(hashKeys.size());
    for (Map.Entry<String, Integer> entry : hashKeys.entrySet()) {
      encoder.writeString(entry.getKey()).writeInt(entry.getValue());
    }
    encoder.writeInt(0); // per Avro spec, end with a (block of length) zero
    return bos.toByteArray();
  }
View Full Code Here

Examples of co.cask.cdap.common.io.Encoder.writeString()

    }
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    Encoder encoder = new BinaryEncoder(bos);
    encoder.writeInt(hashKeys.size());
    for (Map.Entry<String, Integer> entry : hashKeys.entrySet()) {
      encoder.writeString(entry.getKey()).writeInt(entry.getValue());
    }
    encoder.writeInt(0); // per Avro spec, end with a (block of length) zero
    return bos.toByteArray();
  }
View Full Code Here

Examples of co.cask.tigon.io.BinaryEncoder.writeString()

    }
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    Encoder encoder = new BinaryEncoder(bos);
    encoder.writeInt(hashKeys.size());
    for (Map.Entry<String, Integer> entry : hashKeys.entrySet()) {
      encoder.writeString(entry.getKey()).writeInt(entry.getValue());
    }
    encoder.writeInt(0); // per Avro spec, end with a (block of length) zero
    return bos.toByteArray();
  }
View Full Code Here

Examples of co.cask.tigon.io.Encoder.writeString()

    }
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    Encoder encoder = new BinaryEncoder(bos);
    encoder.writeInt(hashKeys.size());
    for (Map.Entry<String, Integer> entry : hashKeys.entrySet()) {
      encoder.writeString(entry.getKey()).writeInt(entry.getValue());
    }
    encoder.writeInt(0); // per Avro spec, end with a (block of length) zero
    return bos.toByteArray();
  }
View Full Code Here

Examples of co.cask.tigon.sql.io.GDATEncoder.writeString()

          break;
        case DOUBLE:
          encoder.writeDouble(Double.valueOf(value));
          break;
        case STRING:
          encoder.writeString(value);
          break;
      }
      index++;
    }
    if (!eof) {
View Full Code Here

Examples of codechicken.lib.packet.PacketCustom.writeString()

        PacketCustom packet = new PacketCustom(channel, 10);

        packet.writeByte(actions.size());
        for (String s : actions)
            packet.writeString(s);

        packet.writeByte(disabled.size());
        for (String s : disabled)
            packet.writeString(s);
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.