private void checkReadPrimitiveTypes() throws IOException {
  if (primitiveData == input || primitiveData.available() > 0) {
    return;
  }
  do {
    int next=0;
    if (hasPushbackTC) {
      hasPushbackTC=false;
    }
 else {
      next=input.read();
      pushbackTC=(byte)next;
    }
switch (pushbackTC) {
case TC_BLOCKDATA:
      primitiveData=new ByteArrayInputStream(readBlockData());
    return;
case TC_BLOCKDATALONG:
  primitiveData=new ByteArrayInputStream(readBlockDataLong());
return;
case TC_RESET:
resetState();
break;
default :
if (next != -1) {
pushbackTC();
}
return;
}
}
 while (true);
}

private void checkReadPrimitiveTypes ( ) throws IOException { if ( primitiveData == input || primitiveData . available ( ) > 0 ) { return ; } do { int next = 0 ; if ( hasPushbackTC ) { hasPushbackTC = false ; } else { next = input . read ( ) ; pushbackTC = ( byte ) next ; } switch ( pushbackTC ) { case TC_BLOCKDATA : primitiveData = new ByteArrayInputStream ( readBlockData ( ) ) ; return ; case TC_BLOCKDATALONG : primitiveData = new ByteArrayInputStream ( readBlockDataLong ( ) ) ; return ; case TC_RESET : resetState ( ) ; break ; default : if ( next != - 1 ) { pushbackTC ( ) ; } return ; } } while ( true ) ; }
checks to if it is ok to read primitive types from this stream at this point . one is not supposed to read primitive types when about to read an object , for example , so an exception has to be thrown .
