Package java.lang

Examples of java.lang.IllegalStateException


                if (_currentIndex < _nextIndex) {
                    _nextIndex--;
                }
                _currentIndex = -1;
            } else {
                throw new IllegalStateException();
            }
        }
View Full Code Here


     * @throws IllegalStateException if this reader is being reused and
     *         it has not been {@link #close closed} or {@link #reset reset}.
     */
    public CharSequenceReader setInput(CharSequence charSequence) {
        if (_input != null)
            throw new IllegalStateException("Reader not closed or reset");
        _input = charSequence;
        return this;
    }
View Full Code Here

     * @throws IllegalStateException if this reader is being reused and
     *         it has not been {@link #close closed} or {@link #reset reset}.
     */
    public UTF8StreamReader setInput(InputStream inStream) {
        if (_inputStream != null)
            throw new IllegalStateException("Reader not closed or reset");
        _inputStream = inStream;
        return this;
    }
View Full Code Here

     * @see    javolution.io.UTF8ByteBufferWriter
     * @see    javolution.io.AppendableWriter
     */
    public void setOutput(Writer writer) throws XMLStreamException {
        if (_writer != null)
            throw new IllegalStateException("Writer not closed or reset");
        _writer = writer;
    }
View Full Code Here

        if ((prefix == null) || (prefix.length() == 0)
                || _namespaces._xmlns.equals(prefix)) {
            prefix = _namespaces._defaultNsPrefix;
        }
        if (!_isElementOpen) // Check now as the actual writting is queued.
            throw new IllegalStateException("No open start element");
        _namespaces.setPrefix(prefix,
                (namespaceURI == null) ? _namespaces._nullNsURI : namespaceURI,
                true);
    }
View Full Code Here

    // Writes a new attribute.
    private void writeAttributeOrNamespace(CharSequence prefix,
            CharSequence namespaceURI, CharSequence localName,
            CharSequence value) throws XMLStreamException {
        if (!_isElementOpen)
            throw new IllegalStateException("No open start element");
        write(' ');

        // Writes prefix if any.
        if ((namespaceURI != null)
                && (!_namespaces._defaultNamespace.equals(namespaceURI))) {
View Full Code Here

            _nextIndex++;
        }

        public void set(Object o) {
            if (_currentNode == null)
                throw new IllegalStateException();
            _currentNode._value = o;
        }
View Full Code Here

            _currentNode._value = o;
        }

        public void remove() {
            if (_currentNode == null)
                throw new IllegalStateException();
            if (_nextNode == _currentNode) { // previous() has been called.
                _nextNode = _nextNode._next;
            } else {
                _nextIndex--;
            }
View Full Code Here

     * @throws IllegalStateException if this reader is being reused and
     *         it has not been {@link #close closed} or {@link #reset reset}.
     */
    public UTF8ByteBufferReader setInput(ByteBuffer byteBuffer) {
        if (_byteBuffer != null)
            throw new IllegalStateException("Reader not closed or reset");
        _byteBuffer = byteBuffer;
        return this;
    }
View Full Code Here

     * @throws IllegalStateException if this writer is being reused and
     *         it has not been {@link #close closed} or {@link #reset reset}.
     */
    public UTF8StreamWriter setOutput(OutputStream out) {
        if (_outputStream != null)
            throw new IllegalStateException("Writer not closed or reset");
        _outputStream = out;
        return this;
    }
View Full Code Here

TOP

Related Classes of java.lang.IllegalStateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.