Package com.maverick.util

Examples of com.maverick.util.ByteArrayWriter.writeInt()


      log.info("Tunneled web forward listener started on port "
          + listener.getLocalPort());
      // #endif

      ByteArrayWriter w = new ByteArrayWriter();
      w.writeInt(listener.getLocalPort());
      request.setRequestData(w.toByteArray());
      return true;
    } catch (Exception e) {
      // #ifdef DEBUG
      log.error("Failed to process openURL request", e);
View Full Code Here


                        new IvParameterSpec(iv, 0, cipher.getBlockSize()));

                    ByteArrayWriter data = new ByteArrayWriter();
                    baw.writeString(type);
                    baw.write(iv);
                    data.writeInt(cookie);
                    data.writeBinaryString(keyblob);

                    // Encrypt and write
                    baw.writeBinaryString(cipher.doFinal(data.toByteArray()));
View Full Code Here

        for (int index = 0; index < values.length; index++) {
            Object value = values[index];
            if (value instanceof BigInteger) {
                writer.writeBigInteger((BigInteger) value);
            } else if (value instanceof Integer) {
                writer.writeInt(((Integer) value).intValue());
            } else if (value instanceof Long) {
                writer.writeUINT64(((Long) value).longValue());
            } else if (value instanceof Short) {
                writer.writeShort(((Short) value).shortValue());
            } else if (value instanceof Boolean) {
View Full Code Here

  }
 
  public byte[] create() throws IOException {
    ByteArrayWriter msg = new ByteArrayWriter();
    msg.writeString(hostname);
    msg.writeInt(port);
   
    return msg.toByteArray();
  }

  public void onChannelClose() {
View Full Code Here

   */
  public byte[] create() throws IOException {

    ByteArrayWriter msg = new ByteArrayWriter();
    msg.writeString(hostname);
    msg.writeInt(port);
    return msg.toByteArray();
  }

  public void onChannelOpen(byte[] data) {

View Full Code Here

      r.setLaunchSession(launchSession);
      String destHost = r.replace(tunnel.getDestination().getHost());
     
        ByteArrayWriter msg = new ByteArrayWriter();
        msg.writeString(launchSession == null ? "" : launchSession.getId());
        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());       
        msg.writeInt(tunnel.getSourcePort());
View Full Code Here

     
        ByteArrayWriter msg = new ByteArrayWriter();
        msg.writeString(launchSession == null ? "" : launchSession.getId());
        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());       
        msg.writeInt(tunnel.getSourcePort());
        msg.writeInt(tunnel.getDestination().getPort());
        msg.writeString(destHost);
View Full Code Here

        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());       
        msg.writeInt(tunnel.getSourcePort());
        msg.writeInt(tunnel.getDestination().getPort());
        msg.writeString(destHost);
        Request req = new Request(START_LOCAL_TUNNEL, msg.toByteArray());
        return req;
View Full Code Here

        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());       
        msg.writeInt(tunnel.getSourcePort());
        msg.writeInt(tunnel.getDestination().getPort());
        msg.writeString(destHost);
        Request req = new Request(START_LOCAL_TUNNEL, msg.toByteArray());
        return req;

    }
View Full Code Here

        CoreException e = null;

        for (Tunnel tunnel : tunnels) {
            try {
                ByteArrayWriter msg = new ByteArrayWriter();
                msg.writeInt(tunnel.getResourceId());
                if (!agent.sendRequest(new Request(STOP_LOCAL_TUNNEL, msg.toByteArray()), false) && e == null) {
                    e = new TunnelException(TunnelException.AGENT_REFUSED_LOCAL_TUNNEL_STOP, (Throwable)null);
                }
            } catch (IOException ex) {
                throw new TunnelException(TunnelException.INTERNAL_ERROR, ex);
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.