public void close() throws IOException { InputStream in = mIn; if (in != null) { mIn = null; freeBuffers(); in.close(); } }
/** * Although this method is implemented by the base class, AND it should * never be called by Woodstox code, let's still implement it bit more * efficiently just in case */ public int read() throws IOException { if (mTmpBuf == null) { mTmpBuf = new char[1]; } if (read(mTmpBuf, 0, 1) < 1) { return -1; } return mTmpBuf[0]; }
r.setXmlCompliancy(XmlConsts.XML_V_11);
private void closeAndRecycle(boolean fullClose) throws IOException { char[] buf = mBuffer; // Can we recycle buffers? if (buf != null) { mBuffer = null; mConfig.freeFullCBuffer(buf); } // How about Reader; close and/or recycle its buffers? if (mReader != null) { if (mReader instanceof BaseReader) { ((BaseReader) mReader).freeBuffers(); } if (fullClose) { Reader r = mReader; mReader = null; r.close(); } } } }
r.setXmlCompliancy(XmlConsts.XML_V_11);
/** * Although this method is implemented by the base class, AND it should * never be called by Woodstox code, let's still implement it bit more * efficiently just in case */ @Override public int read() throws IOException { if (mTmpBuf == null) { mTmpBuf = new char[1]; } if (read(mTmpBuf, 0, 1) < 1) { return -1; } return mTmpBuf[0]; }
public void close() throws IOException { //System.err.println("DEBUG: BaseReader, close"); InputStream in = mIn; if (in != null) { mIn = null; freeBuffers(); in.close(); } }
r.setXmlCompliancy(XmlConsts.XML_V_11);
/** * Although this method is implemented by the base class, AND it should * never be called by Woodstox code, let's still implement it bit more * efficiently just in case */ public int read() throws IOException { if (mTmpBuf == null) { mTmpBuf = new char[1]; } if (read(mTmpBuf, 0, 1) < 1) { return -1; } return mTmpBuf[0]; }
public void close() throws IOException { //System.err.println("DEBUG: BaseReader, close"); InputStream in = mIn; if (in != null) { mIn = null; freeBuffers(); in.close(); } }
r.setXmlCompliancy(XmlConsts.XML_V_11);
/** * Although this method is implemented by the base class, AND it should * never be called by Woodstox code, let's still implement it bit more * efficiently just in case */ public int read() throws IOException { if (mTmpBuf == null) { mTmpBuf = new char[1]; } if (read(mTmpBuf, 0, 1) < 1) { return -1; } return mTmpBuf[0]; }
@Override public void close() throws IOException { InputStream in = mIn; if (in != null) { mIn = null; freeBuffers(); in.close(); } }
r.setXmlCompliancy(XmlConsts.XML_V_11);
/** * Although this method is implemented by the base class, AND it should * never be called by Woodstox code, let's still implement it bit more * efficiently just in case */ public int read() throws IOException { if (mTmpBuf == null) { mTmpBuf = new char[1]; } if (read(mTmpBuf, 0, 1) < 1) { return -1; } return mTmpBuf[0]; }
@Override public void close() throws IOException { InputStream in = mIn; if (in != null) { mIn = null; freeBuffers(); in.close(); } }
r.setXmlCompliancy(XmlConsts.XML_V_11);
/** * Although this method is implemented by the base class, AND it should * never be called by Woodstox code, let's still implement it bit more * efficiently just in case */ public int read() throws IOException { if (mTmpBuf == null) { mTmpBuf = new char[1]; } if (read(mTmpBuf, 0, 1) < 1) { return -1; } return mTmpBuf[0]; }
@Override public void close() throws IOException { InputStream in = mIn; if (in != null) { mIn = null; freeBuffers(); in.close(); } }
r.setXmlCompliancy(XmlConsts.XML_V_11);