Package com.maverick.util

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


    launchId = "";
  }
 
  public byte[] create() throws IOException {
    ByteArrayWriter msg = new ByteArrayWriter();
    msg.writeString(hostname);
    msg.writeInt(port);
    msg.writeString(launchId);
    return msg.toByteArray();
  }
View Full Code Here


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

  public byte[] open(byte[] data) throws IOException {
    ByteArrayReader msg = new ByteArrayReader(data);
View Full Code Here

 
  public byte[] create() throws IOException {
 
    try {
      ByteArrayWriter msg = new ByteArrayWriter();
      msg.writeString(name);
      msg.writeString(ticket);
      msg.writeString(filename.replace('\\', '/'));
     
      return msg.toByteArray();
    } catch (IOException e) {
View Full Code Here

  public byte[] create() throws IOException {
 
    try {
      ByteArrayWriter msg = new ByteArrayWriter();
      msg.writeString(name);
      msg.writeString(ticket);
      msg.writeString(filename.replace('\\', '/'));
     
      return msg.toByteArray();
    } catch (IOException e) {
      throw new IOException("Failed to create application descriptor channel open request message");
View Full Code Here

 
    try {
      ByteArrayWriter msg = new ByteArrayWriter();
      msg.writeString(name);
      msg.writeString(ticket);
      msg.writeString(filename.replace('\\', '/'));
     
      return msg.toByteArray();
    } catch (IOException e) {
      throw new IOException("Failed to create application descriptor channel open request message");
    }
View Full Code Here

            resource,
            policy);
          launchSession.checkAccessRights(null, agent.getSession());
                    String uri = resource.getLaunchUri(launchSession);
                    ByteArrayWriter baw = new ByteArrayWriter();
                    baw.writeString(uri);
                    request.setRequestData(baw.toByteArray());
                  return true;
        }
      } catch (Exception e) {
        log.error("Failed to start tunnel.", e);
View Full Code Here

    app.start();
    Vector tunnels = ((AgentApplicationLauncher)app.getLauncher()).getTunnels();   
    ByteArrayWriter baw = new ByteArrayWriter();
    for(Enumeration e = tunnels.elements(); e.hasMoreElements(); ) {
            TunnelConfiguration listeningSocketConfiguration = (TunnelConfiguration) e.nextElement();
            baw.writeString(listeningSocketConfiguration.getName());
            baw.writeString(listeningSocketConfiguration.getSourceInterface());
            baw.writeInt(listeningSocketConfiguration.getSourcePort());     
    }
    request.setRequestData(baw.toByteArray());
   
View Full Code Here

    Vector tunnels = ((AgentApplicationLauncher)app.getLauncher()).getTunnels();   
    ByteArrayWriter baw = new ByteArrayWriter();
    for(Enumeration e = tunnels.elements(); e.hasMoreElements(); ) {
            TunnelConfiguration listeningSocketConfiguration = (TunnelConfiguration) e.nextElement();
            baw.writeString(listeningSocketConfiguration.getName());
            baw.writeString(listeningSocketConfiguration.getSourceInterface());
            baw.writeInt(listeningSocketConfiguration.getSourcePort());     
    }
    request.setRequestData(baw.toByteArray());
   
    return true;
View Full Code Here

     * @return byte[]
     */
    public byte[] getEncoded() {
        try {
            ByteArrayWriter baw = new ByteArrayWriter();
            baw.writeString(getAlgorithmName());
            baw.writeBigInteger(pubKey.getPublicExponent());
            baw.writeBigInteger(pubKey.getModulus());

            return baw.toByteArray();
        } catch (IOException ioe) {
View Full Code Here

            Signature sig = Signature.getInstance("SHA1withRSA");
            sig.initSign(prvKey);
            sig.update(data);

            ByteArrayWriter baw = new ByteArrayWriter();
            baw.writeString(getAlgorithmName());
            baw.writeBinaryString(sig.sign());

            return baw.toByteArray();
        } catch (Exception e) {
            return null;
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.