Package com.sun.sgs.impl.sharedutil

Examples of com.sun.sgs.impl.sharedutil.MessageBuffer.limit()


    break;
   
      case SimpleSgsProtocol.SESSION_MESSAGE:
    ByteBuffer clientMessage =
        ByteBuffer.wrap(msg.getBytes(msg.limit() - msg.position()));
    if (protocolHandler == null) {
        // ignore message before authentication
        if (logger.isLoggable(Level.FINE)) {
      logger.log(
          Level.FINE,
View Full Code Here


      case SimpleSgsProtocol.CHANNEL_MESSAGE:
    BigInteger channelRefId =
        new BigInteger(1, msg.getBytes(msg.getShort()));
    ByteBuffer channelMessage =
        ByteBuffer.wrap(msg.getBytes(msg.limit() - msg.position()));
    if (protocolHandler == null) {
        // ignore message before authentication
        if (logger.isLoggable(Level.FINE)) {
      logger.log(
          Level.FINE,
View Full Code Here

  MessageBuffer buf = new MessageBuffer(s.length() * 2);
  for (char c : s.toCharArray()) {
      buf.putChar(c);
      System.err.print(c);
  }
  System.err.println("\nlimit: " + buf.limit());
  buf.rewind();
  char[] charArray = new char[s.length()];
  for (int i = 0; i < s.length(); i++) {
      charArray[i] = buf.getChar();
      System.err.print(charArray[i]);
View Full Code Here

      fail("Expected string: " + s + ", got: " + newString);
  }
  if (x != newX) {
      fail("Expected int: " + x + ", got: " + newX);
  }
  if (buf.position() != buf.limit()) {
      fail("limit not equal to position; limit: " + buf.limit() +
     ", position: " + buf.position());
  }
    }
View Full Code Here

  }
  if (x != newX) {
      fail("Expected int: " + x + ", got: " + newX);
  }
  if (buf.position() != buf.limit()) {
      fail("limit not equal to position; limit: " + buf.limit() +
     ", position: " + buf.position());
  }
    }

    public void testPutStringGetUTF8() {
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.