Record Class XSProlog
java.lang.Object
java.lang.Record
com.io7m.xstructural.vanilla.internal.format.XSProlog
- Record Components:
version- Theversionvalue, never nullencoding- Theencodingvalue, or null if absentstandalone- Thestandalonevalue:-1if absent,0for"no",1for"yes"hasBom- Whether the input began with a UTF-8 byte-order mark
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencoding()Returns the value of theencodingrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanhasBom()Returns the value of thehasBomrecord component.final inthashCode()Returns a hash code value for this object.static XSPrologRead the prolog from the leading bytes of a file.intReturns the value of thestandalonerecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
XSProlog
-
-
Method Details
-
read
Read the prolog from the leading bytes of a file.- Parameters:
input- The input file- Returns:
- The prolog
- Throws:
IOException- On errors
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
version
-
encoding
-
standalone
public int standalone()Returns the value of thestandalonerecord component.- Returns:
- the value of the
standalonerecord component
-
hasBom
-