public short readByte() {
int resultInt;
try {
resultInt = socket.getInputStream().read();
} catch (IOException e) {
throw new TransportException(e);
}
if (resultInt == -1) {
throw new TransportException("End of stream reached!");
}
return (short) resultInt;
}