T
- The type of Descriptor
supported by this importerpublic interface DescriptorImporter<T extends Descriptor>
Descriptor
from
some existing source like a stream of bytes or File
Modifier and Type | Method and Description |
---|---|
T |
from(File file)
Creates a new
Descriptor from the given input file |
T |
from(InputStream in)
Creates a new
Descriptor from the given input stream, closing the specified
stream when done, if applicable for the given input stream implementation. |
T |
from(InputStream in,
boolean close)
Creates a new
Descriptor from the given input |
T |
from(String string)
Creates a new
Descriptor from the given input String |
T from(File file) throws IllegalArgumentException, DescriptorImportException
Descriptor
from the given input filefile
- the input fileIllegalArgumentException
- If the file was not specified, does not
exist, or is a directoryDescriptorImportException
- If there was some error on importT from(InputStream in) throws IllegalArgumentException, DescriptorImportException
Descriptor
from the given input stream, closing the specified
stream when done, if applicable for the given input stream implementation.in
- the InputStreamIllegalArgumentException
- If the stream was not specifiedDescriptorImportException
- If there was some error on importT from(InputStream in, boolean close) throws IllegalArgumentException, DescriptorImportException
Descriptor
from the given inputin
- the InputStream to useclose
- whether to close the specified stream or notIllegalArgumentException
- If the stream was not specifiedDescriptorImportException
- If there was some error on importT from(String string) throws IllegalArgumentException, DescriptorImportException
Descriptor
from the given input String
string
- the resource URIIllegalArgumentException
- If the String was not specifiedDescriptorImportException
Copyright © 2013 JBoss by Red Hat. All rights reserved.