1

I have a servlet that load an audio file using a BufferedOutputStream like this :

BufferedInputStream in= new BufferedInputStream( new FileInputStream( file), DEFAULT_BUFFER_SIZE );
BufferedOutputStream out= new BufferedOutputStream( response.getOutputStream(), DEFAULT_BUFFER_SIZE );

byte[] buffer= new byte[DEFAULT_BUFFER_SIZE];
int size;
while ( ( size= in.read( buffer) ) > 0 ) {
    out.write( buffer, 0, size);
}

This file is used in a audio html5 tag (or a swf player if browser doesn't support it). It work fine on some browsers (on windows : IE6-10, Firefox, Chrome, Safari. On smartphone : Chrome, Firefox (beta), default android browser). But in 2 browsers (Safari on iPad/iPhone and HTC browser), i have an exception. When I load the file through my servlet, ~15 seconde after, i receive an exception :

org.apache.catalina.connector.ClientAbortException: java.io.IOException: APR error: -730053

On safari, I can read the file only once, and then I have to reload the audio html5 tag. On HTC browser, I can't read anytime.

Thx a lot.

Clampu
  • 51
  • 7

0 Answers0