class SegmentReader.Norm {
private void closeInput() throws IOException {
if (in != null) {
if (in != singleNormStream) {
// It's private to us -- just close it
in.close();
} else {
// We are sharing this with others -- decRef and
// maybe close the shared norm stream
if (singleNormRef.decRef() == 0) {
singleNormStream.close();
singleNormStream = null;
}
}
in = null;
}
}
}