code: public byte[] readPDU(DataInputStream in, int commandLength, int commandId,
              int commandStatus, int sequenceNumber) throws IOException {
  
          byte[] b = new byte[commandLength];
          System.arraycopy(OctetUtil.intToBytes(commandLength), 0, b, 0, 4);
          System.arraycopy(OctetUtil.intToBytes(commandId), 0, b, 4, 4);
          System.arraycopy(OctetUtil.intToBytes(commandStatus), 0, b, 8, 4);
          System.arraycopy(OctetUtil.intToBytes(sequenceNumber), 0, b, 12, 4);
  
          if (commandLength > 16) {
              synchronized (in) {
                  in.readFully(b, 16, commandLength - 16);
              }
          }
          return b;
      }
docs: /* (non-Javadoc)
  @see org.jsmpp.PDUReader#readPDU(java.io.InputStream, int, int, int, int)