Package com.maverick.util

Examples of com.maverick.util.ByteArrayReader.readString()


      }
  }

  public byte[] open(byte[] data) throws IOException, ChannelOpenException {
    ByteArrayReader msg = new ByteArrayReader(data);
    this.hostname = msg.readString();
    this.port = (int) msg.readInt();
        this.socket = MultiplexedSocketFactory.getDefault().createSocket(hostname, port);
    return null;
  }
}
View Full Code Here


  /* (non-Javadoc)
   * @see com.maverick.multiplex.MultiplexChannel#open(int, byte[])
   */
  public byte[] open(byte[] data) throws IOException {
    ByteArrayReader reader = new ByteArrayReader(data);
    hostname = reader.readString();
    port = (int)reader.readInt();

    socket = new Socket(hostname, port);

    return null;
View Full Code Here

  @Override
  public byte[] open(byte[] data) throws IOException, ChannelOpenException {

    try {
      ByteArrayReader reader = new ByteArrayReader(data);
      name = reader.readString();
      launchId = reader.readString();
      filename = reader.readString();

      LaunchSession launchSession = LaunchSessionFactory.getInstance().getLaunchSession(launchId);
      if (launchSession == null) {
View Full Code Here

  public byte[] open(byte[] data) throws IOException, ChannelOpenException {

    try {
      ByteArrayReader reader = new ByteArrayReader(data);
      name = reader.readString();
      launchId = reader.readString();
      filename = reader.readString();

      LaunchSession launchSession = LaunchSessionFactory.getInstance().getLaunchSession(launchId);
      if (launchSession == null) {
        throw new ChannelOpenException(ChannelOpenException.CHANNEL_REFUSED, "No launch session with ID " + launchId + ", cannot read file " + filename + " for " + name);
View Full Code Here

    try {
      ByteArrayReader reader = new ByteArrayReader(data);
      name = reader.readString();
      launchId = reader.readString();
      filename = reader.readString();

      LaunchSession launchSession = LaunchSessionFactory.getInstance().getLaunchSession(launchId);
      if (launchSession == null) {
        throw new ChannelOpenException(ChannelOpenException.CHANNEL_REFUSED, "No launch session with ID " + launchId + ", cannot read file " + filename + " for " + name);
      }
View Full Code Here

     */
    public byte[] open(byte[] data) throws IOException, ChannelOpenException {

        ByteArrayReader reader = new ByteArrayReader(data);
        initiator = reader.readBoolean();
        id = reader.readString();

        if (initiator) {
            System.out.println("Opening intiator channel");
            if (streamManager.containsChannel(id, true)) {
                throw new ChannelOpenException(ChannelOpenException.CHANNEL_REFUSED,
View Full Code Here

     */
    public byte[] open(byte[] data) throws IOException, ChannelOpenException {

        ByteArrayReader reader = new ByteArrayReader(data);
        initiator = reader.readBoolean();
        id = reader.readString();
        // #ifdef DEBUG
        log.debug("Opening. Id is '" + id + "', initiator is '" + initiator + "'");
        // #endif

        if (initiator) {
View Full Code Here

     
      try {
        ByteArrayReader reader = new ByteArrayReader(request.getRequestData());
       
        int type = (int)reader.readInt();
        String name = reader.readString();
        ByteArrayWriter baw = new ByteArrayWriter();
       
        switch(type) {
          case PROFILE:
          {
View Full Code Here

  /* (non-Javadoc)
   * @see com.maverick.multiplex.Channel#open(byte[])
   */
  public byte[] open(byte[] data) throws IOException , ChannelOpenException{
    ByteArrayReader msg = new ByteArrayReader(data);
    this.hostname = msg.readString();
    this.port = (int) msg.readInt();
        try {
            this.socket = CustomSocketFactory.getDefault().createSocket(hostname, port);
        } catch (IOException ioe) {
            throw new ChannelOpenException(ChannelOpenException.CONNECT_FAILED, ioe.getMessage());
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.