blob: 8e73a04c9b48e9f37c581e29f37e4376ce1ae68b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package org.zwobble.mammoth.internal.docx;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.util.Optional;
public interface DocxFile extends Closeable {
static InputStream getInputStream(DocxFile file, String name) throws IOException {
return file.tryGetInputStream(name)
.orElseThrow(() -> new IOException("Missing entry in file: " + name));
}
Optional<InputStream> tryGetInputStream(String name) throws IOException;
}
|