public final char[] allocConcatBuffer() { if (this._concatCBuffer != null) throw new IllegalStateException("Trying to call allocConcatBuffer() second time"); this._concatCBuffer = this._bufferRecycler.allocCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER); return this._concatCBuffer; }
public final char[] allocNameCopyBuffer(int paramInt) { if (this._nameCopyBuffer != null) throw new IllegalStateException("Trying to call allocNameCopyBuffer() second time"); this._nameCopyBuffer = this._bufferRecycler.allocCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, paramInt); return this._nameCopyBuffer; }
public final byte[] allocReadIOBuffer() { if (this._readIOBuffer != null) throw new IllegalStateException("Trying to call allocReadIOBuffer() second time"); this._readIOBuffer = this._bufferRecycler.allocByteBuffer(BufferRecycler.ByteBufferType.READ_IO_BUFFER); return this._readIOBuffer; }
public final char[] allocTokenBuffer() { if (this._tokenCBuffer != null) throw new IllegalStateException("Trying to call allocTokenBuffer() second time"); this._tokenCBuffer = this._bufferRecycler.allocCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER); return this._tokenCBuffer; }
public final byte[] allocWriteEncodingBuffer() { if (this._writeEncodingBuffer != null) throw new IllegalStateException("Trying to call allocWriteEncodingBuffer() second time"); this._writeEncodingBuffer = this._bufferRecycler.allocByteBuffer(BufferRecycler.ByteBufferType.WRITE_ENCODING_BUFFER); return this._writeEncodingBuffer; }
public final void releaseConcatBuffer(char[] paramArrayOfChar) { if (paramArrayOfChar != null) { if (paramArrayOfChar != this._concatCBuffer) throw new IllegalArgumentException("Trying to release buffer not owned by the context"); this._concatCBuffer = null; this._bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER, paramArrayOfChar); } }
public final void releaseNameCopyBuffer(char[] paramArrayOfChar) { if (paramArrayOfChar != null) { if (paramArrayOfChar != this._nameCopyBuffer) throw new IllegalArgumentException("Trying to release buffer not owned by the context"); this._nameCopyBuffer = null; this._bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, paramArrayOfChar); } }
public final void releaseReadIOBuffer(byte[] paramArrayOfByte) { if (paramArrayOfByte != null) { if (paramArrayOfByte != this._readIOBuffer) throw new IllegalArgumentException("Trying to release buffer not owned by the context"); this._readIOBuffer = null; this._bufferRecycler.releaseByteBuffer(BufferRecycler.ByteBufferType.READ_IO_BUFFER, paramArrayOfByte); } }
public final void releaseTokenBuffer(char[] paramArrayOfChar) { if (paramArrayOfChar != null) { if (paramArrayOfChar != this._tokenCBuffer) throw new IllegalArgumentException("Trying to release buffer not owned by the context"); this._tokenCBuffer = null; this._bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER, paramArrayOfChar); } }
public final void releaseWriteEncodingBuffer(byte[] paramArrayOfByte) { if (paramArrayOfByte != null) { if (paramArrayOfByte != this._writeEncodingBuffer) throw new IllegalArgumentException("Trying to release buffer not owned by the context"); this._writeEncodingBuffer = null; this._bufferRecycler.releaseByteBuffer(BufferRecycler.ByteBufferType.WRITE_ENCODING_BUFFER, paramArrayOfByte); } }
/** *<p> * Note: the method can only be called once during its life cycle. * This is to protect against accidental sharing. */ public byte[] allocReadIOBuffer() { if (_readIOBuffer != null) { throw new IllegalStateException("Trying to call allocReadIOBuffer() second time"); } _readIOBuffer = _bufferRecycler.allocByteBuffer(BufferRecycler.ByteBufferType.READ_IO_BUFFER); return _readIOBuffer; }
public byte[] allocWriteEncodingBuffer() { if (_writeEncodingBuffer != null) { throw new IllegalStateException("Trying to call allocWriteEncodingBuffer() second time"); } _writeEncodingBuffer = _bufferRecycler.allocByteBuffer(BufferRecycler.ByteBufferType.WRITE_ENCODING_BUFFER); return _writeEncodingBuffer; }
public char[] allocTokenBuffer() { if (_tokenCBuffer != null) { throw new IllegalStateException("Trying to call allocTokenBuffer() second time"); } _tokenCBuffer = _bufferRecycler.allocCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER); return _tokenCBuffer; }
public char[] allocConcatBuffer() { if (_concatCBuffer != null) { throw new IllegalStateException("Trying to call allocConcatBuffer() second time"); } _concatCBuffer = _bufferRecycler.allocCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER); return _concatCBuffer; }
public char[] allocNameCopyBuffer(int minSize) { if (_nameCopyBuffer != null) { throw new IllegalStateException("Trying to call allocNameCopyBuffer() second time"); } _nameCopyBuffer = _bufferRecycler.allocCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, minSize); return _nameCopyBuffer; }
/** * Method to call when all the processing buffers can be safely * recycled. */ public void releaseReadIOBuffer(byte[] buf) { if (buf != null) { /* Let's do sanity checks to ensure once-and-only-once release, * as well as avoiding trying to release buffers not owned */ if (buf != _readIOBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _readIOBuffer = null; _bufferRecycler.releaseByteBuffer(BufferRecycler.ByteBufferType.READ_IO_BUFFER, buf); } }
public void releaseWriteEncodingBuffer(byte[] buf) { if (buf != null) { /* Let's do sanity checks to ensure once-and-only-once release, * as well as avoiding trying to release buffers not owned */ if (buf != _writeEncodingBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _writeEncodingBuffer = null; _bufferRecycler.releaseByteBuffer(BufferRecycler.ByteBufferType.WRITE_ENCODING_BUFFER, buf); } }
public void releaseTokenBuffer(char[] buf) { if (buf != null) { if (buf != _tokenCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _tokenCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER, buf); } }
public void releaseConcatBuffer(char[] buf) { if (buf != null) { if (buf != _concatCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _concatCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER, buf); } }
public void releaseNameCopyBuffer(char[] buf) { if (buf != null) { if (buf != _nameCopyBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _nameCopyBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, buf); } }
public IOContext(BufferRecycler paramBufferRecycler, Object paramObject, boolean paramBoolean) { this._bufferRecycler = paramBufferRecycler; this._sourceRef = paramObject; this._managedResource = paramBoolean; }
public SegmentedStringWriter(BufferRecycler paramBufferRecycler) { this._buffer = new TextBuffer(paramBufferRecycler); }