@Override public byte[] deserialize(InputStream inputStream) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(this.initialBufferSize); if (StreamUtils.copy(inputStream, out) == 0) { throw new SoftEndOfStreamException("Stream closed with no data"); } out.close(); return out.toByteArray(); }
int status = read(inputStream, lengthPart, true); if (status < 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
bite = inputStream.read(); if (bite < 0 && n == 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
throw new SoftEndOfStreamException("Stream closed between payloads");
bite = inputStream.read(); if (bite < 0 && n == 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
@Override public byte[] deserialize(InputStream inputStream) throws IOException { PushbackInputStream pbis = (PushbackInputStream) inputStream; int first = pbis.read(); if (first < 0) { throw new SoftEndOfStreamException(); } pbis.unread(first); if (first == ByteArrayStxEtxSerializer.STX) { this.receivedStxEtx = true; return this.stxEtx.deserialize(pbis); } else { this.receivedCrLf = true; return this.crlf.deserialize(pbis); } }
int bite = inputStream.read(); if (bite < 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
header[0] = (byte) inputStream.read(); if (header[0] < 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
@Override public byte[] deserialize(InputStream inputStream) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(this.initialBufferSize); if (StreamUtils.copy(inputStream, out) == 0) { throw new SoftEndOfStreamException("Stream closed with no data"); } out.close(); return out.toByteArray(); }
bite = inputStream.read(); if (bite < 0 && n == 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
int status = read(inputStream, lengthPart, true); if (status < 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
throw new SoftEndOfStreamException("Stream closed between payloads");
throw new SoftEndOfStreamException();
bite = inputStream.read(); if (bite < 0 && n == 0) { throw new SoftEndOfStreamException("Stream closed between payloads");
int bite = inputStream.read(); if (bite < 0) { throw new SoftEndOfStreamException("Stream closed between payloads");