Package de.fu_berlin.inf.dpp.exceptions

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

TOP

Related Classes of de.fu_berlin.inf.dpp.exceptions.StreamException

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.