Simplify Utils.parseStatus()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / util / NamedFileInputStream.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.parser.util;
9
10 import java.io.File;
11 import java.io.FileInputStream;
12 import java.io.FileNotFoundException;
13
14 public class NamedFileInputStream extends FileInputStream implements NamedInputStream {
15     private final String fileDestination;
16
17     public NamedFileInputStream(File file, String fileDestination) throws FileNotFoundException {
18         super(file);
19         this.fileDestination = fileDestination;
20     }
21
22     public String getFileDestination() {
23         return fileDestination;
24     }
25
26     @Override
27     public String toString() {
28         return fileDestination;
29     }
30 }