Package be.demmel.jgws.packets

Examples of be.demmel.jgws.packets.PacketArray.constant()


        readActions.add((packet, dataToDeserialize) -> {
          throw new UnsupportedOperationException("int[] deserialization unsupported (aka TODO)");
        });
      } else if (type == short[].class) {
        PacketArray packetArray = field.getAnnotation(PacketArray.class);
        final boolean constant = packetArray.constant();
        final int arraySize = packetArray.size();

        readActions.add((packet, dataToDeserialize) -> {
          int lengthOfArray = 0;
          if (!constant) {
View Full Code Here


            throw new RuntimeException(e);
          }
        });
      } else if (type == long[].class) {
        PacketArray packetArray = field.getAnnotation(PacketArray.class);
        final boolean constant = packetArray.constant();
        final int constantLength = packetArray.size();
        writeActions.add((packet, buffer) -> {
          try {
            long[] data = (long[]) field.get(packet);
            if (!constant) {
View Full Code Here

            throw new RuntimeException(e);
          }
        });
      } else if (type == int[].class) {
        PacketArray packetArray = field.getAnnotation(PacketArray.class);
        final boolean constant = packetArray.constant();
        writeActions.add((packet, buffer) -> {
          try {
            if (!constant) {
              buffer.writeShort(((int[]) field.get(packet)).length);
            }
View Full Code Here

            throw new RuntimeException(e);
          }
        });
      } else if (type == short[].class) {
        PacketArray packetArray = field.getAnnotation(PacketArray.class);
        final boolean constant = packetArray.constant();
        writeActions.add((packet, buffer) -> {
          try {
            if (!constant) {
              buffer.writeShort(((short[]) field.get(packet)).length);
            }
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.