private int getLabelPosition(final Label label) { // Gets the position in the stream of a particular label. // Verifies that the label exists and that it has been given a value. final int index = label.getLabelValue(); if (index < 0 || index >= _labelCount) { throw Error.badLabel(); } if (_labelList[index] < 0) { throw Error.badLabelContent(); } return _labelList[index]; }
public void markLabel(final Label label) { // Defines a label by setting the position where that label is found // within the stream. Verifies the label is not defined more than once. final int labelIndex = label.getLabelValue(); // This should never happen. if (labelIndex < 0 || labelIndex >= _labelList.length) { throw Error.badLabel(); } if (_labelList[labelIndex] != -1) { throw Error.labelAlreadyDefined(); } _labelList[labelIndex] = _codeStream.getLength(); }
private int getLabelPosition(final Label label) { // Gets the position in the stream of a particular label. // Verifies that the label exists and that it has been given a value. final int index = label.getLabelValue(); if (index < 0 || index >= _labelCount) { throw Error.badLabel(); } if (_labelList[index] < 0) { throw Error.badLabelContent(); } return _labelList[index]; }
public void markLabel(final Label label) { // Defines a label by setting the position where that label is found // within the stream. Verifies the label is not defined more than once. final int labelIndex = label.getLabelValue(); // This should never happen. if (labelIndex < 0 || labelIndex >= _labelList.length) { throw Error.badLabel(); } if (_labelList[labelIndex] != -1) { throw Error.labelAlreadyDefined(); } _labelList[labelIndex] = _codeStream.getLength(); }
private int getLabelPosition(final Label label) { // Gets the position in the stream of a particular label. // Verifies that the label exists and that it has been given a value. final int index = label.getLabelValue(); if (index < 0 || index >= _labelCount) { throw Error.badLabel(); } if (_labelList[index] < 0) { throw Error.badLabelContent(); } return _labelList[index]; }
public void markLabel(final Label label) { // Defines a label by setting the position where that label is found // within the stream. Verifies the label is not defined more than once. final int labelIndex = label.getLabelValue(); // This should never happen. if (labelIndex < 0 || labelIndex >= _labelList.length) { throw Error.badLabel(); } if (_labelList[labelIndex] != -1) { throw Error.labelAlreadyDefined(); } _labelList[labelIndex] = _codeStream.getLength(); }