* (non-Javadoc)
*
* @see org.jsmpp.util.PDUDecomposer#bind(byte[])
*/
public Bind bind(byte[] b) throws PDUStringException {
Bind req = new Bind();
SequentialBytesReader reader = new SequentialBytesReader(b);
assignHeader(req, reader);
req.setSystemId(reader.readCString());
StringValidator.validateString(req.getSystemId(),
StringParameter.SYSTEM_ID);
req.setPassword(reader.readCString());
StringValidator.validateString(req.getPassword(),
StringParameter.PASSWORD);
req.setSystemType(reader.readCString());
StringValidator.validateString(req.getSystemType(),
StringParameter.SYSTEM_TYPE);
req.setInterfaceVersion(reader.readByte());
req.setAddrTon(reader.readByte());
req.setAddrNpi(reader.readByte());
req.setAddressRange(reader.readCString());
StringValidator.validateString(req.getAddressRange(),
StringParameter.ADDRESS_RANGE);
return req;
}