void readToData(boolean returnOnYield) throws IOException {
  InputStream is=getInputStream();
  if (is == null)   return;
  for (int tag=is.read(); tag >= 0; tag=is.read()) {
switch (tag) {
case 'Y':
      server.freeReadLock();
    if (returnOnYield)     return;
  server.readChannel(channel);
break;
case 'Q':
server.freeReadLock();
this.is=null;
this.server=null;
return;
case 'U':
this.url=readUTF();
break;
case 'D':
chunkLength=(is.read() << 8) + is.read();
return;
default :
readTag(tag);
break;
}
}
}

void readToData ( boolean returnOnYield ) throws IOException { InputStream is = getInputStream ( ) ; if ( is == null ) return ; for ( int tag = is . read ( ) ; tag >= 0 ; tag = is . read ( ) ) { switch ( tag ) { case 'Y' : server . freeReadLock ( ) ; if ( returnOnYield ) return ; server . readChannel ( channel ) ; break ; case 'Q' : server . freeReadLock ( ) ; this . is = null ; this . server = null ; return ; case 'U' : this . url = readUTF ( ) ; break ; case 'D' : chunkLength = ( is . read ( ) << 8 ) + is . read ( ) ; return ; default : readTag ( tag ) ; break ; } } }
reads tags , until getting data .
