public class NamedInputStream extends Object
SmiManager uses NamedInputStreams when compiling MIB specifications into its
internal MIB repository cache.
The InputStream returned by getInputStream() must be closed after
the SmiManager.compile(NamedInputStream) or
SmiManager.compile(NamedInputStream[], CompilationMonitor, boolean, boolean, boolean)
methods have been called.
| Modifier and Type | Class and Description |
|---|---|
static class |
NamedInputStream.ZipFormat |
| Constructor and Description |
|---|
NamedInputStream(File file)
Creates a NamedInputStream from the specified file.
|
NamedInputStream(InputStream inputStream,
String name)
Creates a NamedInputStream from an
InputStream and an identifying name. |
NamedInputStream(InputStream inputStream,
String name,
NamedInputStream.ZipFormat zipFormat)
Creates a NamedInputStream from an
InputStream and an identifying name. |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Gets the
InputStream. |
String |
getName()
Gets the name of the input stream.
|
NamedInputStream.ZipFormat |
getZipFormat()
Gets the compression format of the stream.
|
String |
toString() |
public NamedInputStream(File file) throws FileNotFoundException
file - FileNotFoundExceptionpublic NamedInputStream(InputStream inputStream, String name)
InputStream and an identifying name.inputStream - the InputStream reference. It will/should not be closed by users of this NamedInputStream.name - a unique name of the stream (i.e., a file name).public NamedInputStream(InputStream inputStream, String name, NamedInputStream.ZipFormat zipFormat)
InputStream and an identifying name.inputStream - the InputStream reference. It will/should not be closed by users of this NamedInputStream.name - a unique name of the stream (i.e., a file name).zipFormat - the compression and archive format of the inputStream.public InputStream getInputStream()
InputStream. Callers should not close it. Closing the stream should be done
by the creator of this NamedInputStream.public String getName()
public NamedInputStream.ZipFormat getZipFormat()
NamedInputStream.ZipFormat.none will be returned.NamedInputStream.ZipFormat of this input stream.Copyright © 2015 SNMP4J.com. All Rights Reserved.