else if (read < 0)
{
eos = true;
raf.close();
logger.fine("EOS");
notifyDataSinkListeners(new EndOfStreamEvent(Handler.this, "EOS")); // TODO: needed?
break;
}
else
{
raf.write(buffer, 0, read);
}
}
}
catch (InterruptedException e)
{
break;
}
catch (InterruptedIOException e)
{
break;
}
catch (IOException e)
{
// mgodehardt: do we need this, read end dead may be thrown, its a 0 read, and we continue streaming
//logger.log(Level.FINE, "" + e, e);
//notifyDataSinkListeners(new DataSinkErrorEvent(Handler.this, "" + e));
}
}
setClosed();
try
{
raf.close();
// mgodehardt: do we need this ?
logger.fine("EOS");
notifyDataSinkListeners(new EndOfStreamEvent(Handler.this, "EOS")); // TODO: needed?
}
catch ( Exception dontcare )
{
}
}