Package io.github.jbastgen.stemma.app.io
Class ImageFiles
java.lang.Object
io.github.jbastgen.stemma.app.io.ImageFiles
Which files the diff view shows as pictures (feature 56): the formats JavaFX can decode. SVG is text (its diff is the useful
view) and WebP or TIFF cannot be decoded, so they keep the "Binary file" note.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne version of a picture file.static final recordThe two versions the view compares; either isnullwhen the file does not exist on that side. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longLarger files are not decoded: a picture is held in memory several times over. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisImageFile(String path) Whether the path ends in the extension of a picture format JavaFX can show (case does not matter).static Stringsize(long bytes) A size for people:812 B,3.1 KB,1.4 MB.
-
Field Details
-
MAX_BYTES
public static final long MAX_BYTESLarger files are not decoded: a picture is held in memory several times over.- See Also:
-
-
Method Details
-
isImageFile
Whether the path ends in the extension of a picture format JavaFX can show (case does not matter). -
size
A size for people:812 B,3.1 KB,1.4 MB.
-