code: public Command readPDUHeader(DataInputStream in)
              throws InvalidCommandLengthException, IOException {
          Command header = new Command();
          header.setCommandLength(in.readInt());
  
          if (header.getCommandLength() < 16) {
              // command length too short, read the left dump anyway
              byte[] dump = new byte[header.getCommandLength()];
              if (header.getCommandLength() >= 4) {
                  in.read(dump, 4, header.getCommandLength() - 4);
              }
              throw new InvalidCommandLengthException("Command length "
                      + header.getCommandLength() + " is too short");
          }
          header.setCommandId(in.readInt());
          header.setCommandStatus(in.readInt());
          header.setSequenceNumber(in.readInt());
          return header;
      }
docs: /* (non-Javadoc)
  @see org.jsmpp.PDUReader#readPDUHeader(java.io.DataInputStream)