@ -153,16 +153,6 @@ public class MediawikiImporter extends Thread implements Importer {
if ( p > 0 ) targetstub = targetstub . substring ( 0 , p ) ;
if ( p > 0 ) targetstub = targetstub . substring ( 0 , p ) ;
InputStream is = new BufferedInputStream ( new FileInputStream ( this . sourcefile ) , 1024 * 1024 ) ;
InputStream is = new BufferedInputStream ( new FileInputStream ( this . sourcefile ) , 1024 * 1024 ) ;
if ( this . sourcefile . getName ( ) . endsWith ( ".bz2" ) ) {
if ( this . sourcefile . getName ( ) . endsWith ( ".bz2" ) ) {
int b = is . read ( ) ;
if ( b ! = 'B' ) {
try { is . close ( ) ; } catch ( final IOException e ) { }
throw new IOException ( "Invalid bz2 content." ) ;
}
b = is . read ( ) ;
if ( b ! = 'Z' ) {
try { is . close ( ) ; } catch ( final IOException e ) { }
throw new IOException ( "Invalid bz2 content." ) ;
}
is = new BZip2CompressorInputStream ( is ) ;
is = new BZip2CompressorInputStream ( is ) ;
} else if ( this . sourcefile . getName ( ) . endsWith ( ".gz" ) ) {
} else if ( this . sourcefile . getName ( ) . endsWith ( ".gz" ) ) {
is = new GZIPInputStream ( is ) ;
is = new GZIPInputStream ( is ) ;