Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */
package org.semanticweb.owlapi.io;

import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration;
Expand All @@ -34,7 +35,7 @@ protected AbstractOWLParser() {
@SuppressWarnings("resource")
protected InputSource getInputSource(OWLOntologyDocumentSource source,
OWLOntologyLoaderConfiguration config)
throws OWLOntologyInputSourceException {
throws IOException, OWLOntologyInputSourceException {
Reader in = DocumentSources.wrapInputAsReader(source, config);
InputSource is = new InputSource(in);
is.setSystemId(source.getDocumentIRI().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private DocumentSources() {}
*/
public static Reader wrapInputAsReader(OWLOntologyDocumentSource source,
OWLOntologyLoaderConfiguration configuration, Charset encoding)
throws OWLOntologyInputSourceException {
throws IOException, OWLOntologyInputSourceException {
Optional<Reader> reader = source.getReader();
if (reader.isPresent()) {
return new BufferedReader(reader.get());
Expand All @@ -101,7 +101,7 @@ public static Reader wrapInputAsReader(OWLOntologyDocumentSource source,
* @throws OWLOntologyInputSourceException if an IO related exception is thrown.
*/
public static Reader wrapInputAsReader(OWLOntologyDocumentSource source,
OWLOntologyLoaderConfiguration configuration) throws OWLOntologyInputSourceException {
OWLOntologyLoaderConfiguration configuration) throws IOException, OWLOntologyInputSourceException {
return wrapInputAsReader(source, configuration, StandardCharsets.UTF_8);
}

Expand Down Expand Up @@ -287,7 +287,7 @@ protected static InputStream connectWithFiveRetries(IRI documentIRI,
* @param delegate delegate to wrap
* @return wrapped input stream
*/
public static InputStream wrap(InputStream delegate) {
public static InputStream wrap(InputStream delegate) throws IOException {
checkNotNull(delegate, "delegate cannot be null");
return new BOMInputStream(delegate, ByteOrderMark.UTF_8, ByteOrderMark.UTF_16BE,
ByteOrderMark.UTF_16LE, ByteOrderMark.UTF_32BE, ByteOrderMark.UTF_32LE);
Expand Down