/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, SystemId sysId, Reader r, boolean realClose) { /* To resolve [WSTX-50] need to ensure that P_BASE_URL overrides * the defaults if/as necessary */ URL url = cfg.getBaseURL(); if (url != null) { sysId = SystemId.construct(url); } BranchingReaderSource rs = new BranchingReaderSource(cfg, pubId, sysId, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
/** * Currently this input source does not implement branching */ public void endBranch(int endOffset) { if (mBranchBuffer != null) { if (endOffset > mBranchStartOffset) { appendBranched(mBranchStartOffset, endOffset); } // Let's also make sure no branching is done from this point on: mBranchBuffer = null; } }
((BranchingReaderSource) mInput).startBranch(mTextBuffer, mInputPtr, mNormalizeLFs); ((BranchingReaderSource) mInput).endBranch(mInputPtr-1);
input.initInputLocation(this, mCurrDepth, 0);
input.initInputLocation(this, mCurrDepth, 0);
((BranchingReaderSource) mInput).startBranch(mTextBuffer, mInputPtr, mNormalizeLFs); ((BranchingReaderSource) mInput).endBranch(mInputPtr-1);
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, String sysId, URL src, Reader r, boolean realClose) { BranchingReaderSource rs = new BranchingReaderSource (cfg, pubId, sysId, src, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
public int readInto(WstxInputData reader) throws IOException, XMLStreamException { // Need to flush out branched content? if (mBranchBuffer != null) { if (mInputLast > mBranchStartOffset) { appendBranched(mBranchStartOffset, mInputLast); } mBranchStartOffset = 0; } return super.readInto(reader); }
input.initInputLocation(this, mCurrDepth, 0);
((BranchingReaderSource) mInput).startBranch(mTextBuffer, mInputPtr, mNormalizeLFs); ((BranchingReaderSource) mInput).endBranch(mInputPtr-1);
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, String sysId, URL src, Reader r, boolean realClose) { BranchingReaderSource rs = new BranchingReaderSource (cfg, pubId, sysId, src, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
public boolean readMore(WstxInputData reader, int minAmount) throws IOException, XMLStreamException { // Existing data to output to branch? if (mBranchBuffer != null) { int ptr = reader.mInputPtr; int currAmount = mInputLast - ptr; if (currAmount > 0) { if (ptr > mBranchStartOffset) { appendBranched(mBranchStartOffset, ptr); } mBranchStartOffset = 0; } } return super.readMore(reader, minAmount); }
input.initInputLocation(this, mCurrDepth);
((BranchingReaderSource) mInput).startBranch(mTextBuffer, mInputPtr, mNormalizeLFs); ((BranchingReaderSource) mInput).endBranch(mInputPtr-1);
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, String sysId, URL src, Reader r, boolean realClose) { BranchingReaderSource rs = new BranchingReaderSource (cfg, pubId, sysId, src, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
/** * Currently this input source does not implement branching */ public void endBranch(int endOffset) { if (mBranchBuffer != null) { if (endOffset > mBranchStartOffset) { appendBranched(mBranchStartOffset, endOffset); } // Let's also make sure no branching is done from this point on: mBranchBuffer = null; } }
input.initInputLocation(this, mCurrDepth);
((BranchingReaderSource) mInput).startBranch(mTextBuffer, mInputPtr, mNormalizeLFs); ((BranchingReaderSource) mInput).endBranch(mInputPtr-1);
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, SystemId sysId, Reader r, boolean realClose) { /* To resolve [WSTX-50] need to ensure that P_BASE_URL overrides * the defaults if/as necessary */ URL url = cfg.getBaseURL(); if (url != null) { sysId = SystemId.construct(url); } BranchingReaderSource rs = new BranchingReaderSource(cfg, pubId, sysId, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
/** * Currently this input source does not implement branching */ public void endBranch(int endOffset) { if (mBranchBuffer != null) { if (endOffset > mBranchStartOffset) { appendBranched(mBranchStartOffset, endOffset); } // Let's also make sure no branching is done from this point on: mBranchBuffer = null; } }