Qr Segment
A segment of character/binary/control data in a QR Code symbol. Instances of this class are immutable.
The mid-level way to create a segment is to take the payload data and call a static factory function such as QrSegment.makeNumeric. The low-level way to create a segment is to custom-make the bit buffer and call the with appropriate values.
This segment class imposes no length restrictions, but QR Codes have restrictions. Even in the most favorable conditions, a QR Code can only hold 7089 characters of data. Any segment longer than this is meaningless for the purpose of generating QR Codes. This class can represent kanji mode segments, but provides no help in encoding them
see QrSegmentAdvanced for full kanji support.
Parameters
mode indicator of this segment (not null)
The length of this segment's unencoded data. Measured in characters for numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode. Always zero or positive. Not the same as the data's bit length.
the data bits (not null)
Throws
if the mode or data is null
if the character count is negative