Package com.maverick.util

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


    public boolean processRequest(Request request, MultiplexedConnection connection) {
     
      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


   * @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.