For BufferedInput there is
int maxStreamAvailable();
int maxBufferUsed();
Print these out every few sec to see if they have hit their maximums suggesting loss of data.
If maxStreamAvailable() >=63 and maxBufferUsed() < 511
call nextByteIn() more often
if maxBufferUsed() >= 511 increase the inputbuffer size
Each call to
int maxStreamAvailable();
int maxBufferUsed();
clears the respective maxCounter