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