Guest User

Untitled

a guest
Nov 16th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. public class DataInformation {
  2.  
  3.     /**
  4.      *
  5.      */
  6.     private DataType type;
  7.  
  8.     /**
  9.      *
  10.      */
  11.     private DataEndianness endianness;
  12.  
  13.     /**
  14.      *
  15.      */
  16.     private DataTransformation transformation;
  17.  
  18.     /**
  19.      *
  20.      */
  21.     private boolean signed;
  22.  
  23.     /**
  24.      *
  25.      */
  26.     private Class handler;
  27.  
  28.     /**
  29.      *
  30.      */
  31.     public long read(JanusChannelBuffer buffer) {
  32.         if (signed)
  33.             return buffer.readSigned(type, endianness, transformation);
  34.         else
  35.             return buffer.readUnsigned(type, endianness, transformation);
  36.     }
  37.  
  38.     /**
  39.      *
  40.      * @return
  41.      */
  42.     public Object newHandler() throws Exception {
  43.         return handler.newInstance();
  44.     }
  45.  
  46. }
Add Comment
Please, Sign In to add comment