Examples of StreamException


Examples of com.thoughtworks.xstream.io.StreamException

        switch (firstToken.getType()) {
        case Token.TYPE_START_NODE:
            depthState.setName(idRegistry.get(firstToken.getId()));
            break;
        default:
            throw new StreamException("Expected StartNode");
        }
        while (true) {
            final Token nextToken = readToken();
            switch (nextToken.getType()) {
            case Token.TYPE_ATTRIBUTE:
                depthState.addAttribute(idRegistry.get(nextToken.getId()), nextToken.getValue());
                break;
            case Token.TYPE_VALUE:
                depthState.setValue(nextToken.getValue());
                break;
            case Token.TYPE_END_NODE:
                depthState.setHasMoreChildren(false);
                pushBack(nextToken);
                return;
            case Token.TYPE_START_NODE:
                depthState.setHasMoreChildren(true);
                pushBack(nextToken);
                return;
            default:
                throw new StreamException("Unexpected token " + nextToken);
            }
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

            break;
        case Token.TYPE_START_NODE:
            depthState.setHasMoreChildren(true);
            break;
        default:
            throw new StreamException("Unexpected token " + nextToken);
        }
        pushBack(nextToken);
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.exceptions.StreamException

            }

            if (data == null || data.length == 0) {
                // received none -> error
                throw new StreamException("Packet contained no data");
            }

            if (transferDescription.type.equals(FileTransferType.STREAM_DATA)
                && data.length != streamPath.size) {
                if (streamPath.size > data.length) {
                    log.error("Lost bytes! Got " + data.length + ", expected "
                        + streamPath.size);
                    throw new StreamException(
                        "Received less data than announced.");
                }
                byte[] new_data = new byte[streamPath.size];
                System.arraycopy(data, 0, new_data, 0, streamPath.size);
                data = new_data;
View Full Code Here

Examples of org.eclipse.jetty.spdy.StreamException

        if (info != null)
        {
            if (!committed.compareAndSet(false, true))
            {
                StreamException exception = new StreamException(stream.getId(), StreamStatus.PROTOCOL_ERROR,
                        "Stream already committed!");
                callback.failed(exception);
                if (LOG.isDebugEnabled())
                    LOG.debug("Committed response twice.", exception);
                return;
View Full Code Here

Examples of rocks.xmpp.core.stream.model.StreamException

                }
            });
        } else if (element instanceof StreamFeatures) {
            streamFeaturesManager.processFeatures((StreamFeatures) element);
        } else if (element instanceof StreamError) {
            throw new StreamException((StreamError) element);
        } else {
            // Let's see, if the element is known to any feature negotiator.
            return streamFeaturesManager.processElement(element);
        }
        return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.