open(startAtPosition);
if (startAtPosition == 0) {
try {
if (headerCallback != null) {
UnclosedElementCollectingEventWriter headerCallbackWriter = new UnclosedElementCollectingEventWriter(delegateEventWriter);
headerCallback.write(headerCallbackWriter);
unclosedHeaderCallbackElements = headerCallbackWriter.getUnclosedElements();
}
}
catch (IOException e) {
throw new ItemStreamException("Failed to write headerItems", e);
}