blob: 8ceee7ceec00937dd81f4ecc2ef9514dd9b3cad2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package org.zwobble.mammoth.internal.documents;
import org.zwobble.mammoth.internal.util.InputStreamSupplier;
import java.io.IOException;
import java.io.InputStream;
import java.util.Optional;
public class Image implements DocumentElement {
private final Optional<String> altText;
private final Optional<String> contentType;
private final InputStreamSupplier open;
public Image(Optional<String> altText, Optional<String> contentType, InputStreamSupplier open) {
this.altText = altText;
this.contentType = contentType;
this.open = open;
}
public Optional<String> getAltText() {
return altText;
}
public Optional<String> getContentType() {
return contentType;
}
public InputStream open() throws IOException {
return open.open();
}
@Override
public <T> T accept(DocumentElementVisitor<T> visitor) {
return visitor.visit(this);
}
}
|