} catch ( IllegalAccessException e ) {
throw new FileSystemException( FAILED_TO_ACCESS_REPOSITORY );
}
}
throwExceptionOnBadResponse( response );
StreamingOutput output = (StreamingOutput) response.getEntity();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
output.write( stream );
return stream.toByteArray();
} catch ( FileNotFoundException e ) {
throw new FileSystemException( FILE_NOT_FOUND, fullName );
} catch ( IOException e ) {
throw new FileSystemException( FAILED_TO_WRITE_FILE, fullName );