blob: 0ef8c234d3e55790006aaac604f1f716e14f0cf2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package org.zwobble.mammoth.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;
}
|