@Test public void testEncodeUnsignedInt() throws Exception { assertEquals((short) 0, encodeUnsigned((int) 0)); assertEquals((short) 32768, encodeUnsigned((int) 32768)); }
protected static byte encodeUnsigned(short positive) { if (positive < 128) { return (byte) positive; } else { return (byte) (- (256 - positive)); } }
ByteData extends SmppObject { protected static byte encodeUnsigned(short positive) { if (positive < 128) { return (byte) positive; } else { return (byte) (- (256 - positive)); } } }
ByteData extends SmppObject { protected static byte encodeUnsigned(short positive) { if (positive < 128) { return (byte) positive; } else { return (byte) (- (256 - positive)); } } ByteData(); }
ByteData extends SmppObject { protected static byte encodeUnsigned(short positive) { if (positive < 128) { return (byte) positive; } else { return (byte) (- (256 - positive)); } } ByteData(); abstract void setData(ByteBuffer buffer); abstract ByteBuffer getData(); String debugString(); }
ByteData extends SmppObject { protected static byte encodeUnsigned(short positive) { if (positive < 128) { return (byte) positive; } else { return (byte) (- (256 - positive)); } } ByteData(); abstract void setData(ByteBuffer buffer); abstract ByteBuffer getData(); String debugString();  }