XrefReader.java revision 1385
/**
* $Id$
*
* Copyright (c) 2011-2012 Jens Elkner.
* All Rights Reserved.
*
* This software is the proprietary information of Jens Elkner.
* Use is subject to license terms.
*/
package org.opensolaris.opengrok.analysis;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
/**
* Convinience class to read xref aka cross files.
* NOTE: There is no need to wrap this reader into a buffered reader, since the
* underlying input stream is already buffered.
*
* @author Jens Elkner
* @version $Revision$
*/
public class XrefReader extends InputStreamReader {
/**
* Create a new reader from the given stream.
* @param in stream to use for reading. NOTE: on-the-fly decompression must
* be enabled for the given stream.
* @throws UnsupportedEncodingException
* @see XrefInputStream#XrefInputStream(File, boolean)
*/
public XrefReader(XrefInputStream in) throws UnsupportedEncodingException {
super(in, "UTF-8");
}
/**
* Create a new reader from the given file.
* @param file file to read.
* @throws IOException
* @throws UnsupportedEncodingException
*/
public XrefReader(File file) throws UnsupportedEncodingException, IOException {
this (new XrefInputStream(file, true));
}
}