All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.ripe.db.whois.common.io.RpslObjectFileReader Maven / Gradle / Ivy

/*
 * Copyright (c) 2013 RIPE NCC, 2015 Benjamin Roberts
 * All rights reserved.
 */

package net.ripe.db.whois.common.io;


import java.io.FileInputStream;
import java.io.IOException;
import java.util.zip.GZIPInputStream;

public class RpslObjectFileReader extends RpslObjectStreamReader {
    
    public RpslObjectFileReader(final String fileName) {
        try {
        	inputStream = new FileInputStream(fileName);
            if (fileName.endsWith(".gz")) {
            	inputStream = new GZIPInputStream(inputStream);
            }
        } catch (IOException e) {
            throw new IllegalArgumentException(fileName, e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy