Package java.io

Examples of java.io.SequenceInputStream


        try
        {
            if (globals != null)
            {
                iis = ImageIO.createImageInputStream(
                        new SequenceInputStream(globals.getUnfilteredStream(), encoded));
                reader.setInput(iis);
            }
            else
            {
                iis = ImageIO.createImageInputStream(encoded);
View Full Code Here


            //it is possible that two operators will get concatenated
            //together
            inputStreams.add( new ByteArrayInputStream( inbetweenStreamBytes ) );
        }

        return new SequenceInputStream( inputStreams.elements() );
    }
View Full Code Here

        int bufSignatureOffset = (int)(signatureOffset - inLength);
        System.arraycopy(buffer, 0, signBuffer, 0, bufSignatureOffset);
        System.arraycopy(buffer, bufSignatureOffset + (int)signatureLength,
                         signBuffer, bufSignatureOffset, buffer.length - bufSignatureOffset - (int)signatureLength);

        SequenceInputStream signStream = new SequenceInputStream(new ByteArrayInputStream(inputBytes),
                new ByteArrayInputStream(signBuffer));

        // sign the bytes
        SignatureInterface signatureInterface = doc.getSignatureInterface();
        byte[] sign = signatureInterface.sign(signStream);
View Full Code Here

    public InputStream getInputStream() throws IOException {
      InputStream bis = new ByteArrayInputStream(byteBuffer, byteBufferOffset, byteBufferLength);
      if (tempFile == null)
        return bis;
      InputStream fis = new FileInputStream(tempFile);
      return new SequenceInputStream(bis, fis);
    }
View Full Code Here

            in = source.getInputStream();
            headers = new MailHeaders(in);

            ByteArrayInputStream headersIn
                    = new ByteArrayInputStream(headers.toByteArray());
            in = new SequenceInputStream(headersIn, in);

            message = new MimeMessage(session, in);
        } catch (IOException ioe) {
            ioe.printStackTrace();
            throw new MessagingException("Unable to parse stream: " + ioe.getMessage(), ioe);
View Full Code Here

        // if headers do not contains minimum REQUIRED headers fields throw Exception
        if ( !headers.isValid() ) {
            throw new MessagingException( "Some REQURED header field is missing. Invalid Message" );
        }
        ByteArrayInputStream headersIn = new ByteArrayInputStream( headers.toByteArray() );
        sendMail( new MailImpl( getId(), sender, recipients, new SequenceInputStream( headersIn, msg ) ) );
    }
View Full Code Here

        // if headers do not contains minimum REQUIRED headers fields throw Exception
        if (!headers.isValid()) {
            throw new MessagingException("Some REQURED header field is missing. Invalid Message");
        }
        ByteArrayInputStream headersIn = new ByteArrayInputStream(headers.toByteArray());
        sendMail(new MailImpl(getId(), sender, recipients, new SequenceInputStream(headersIn, msg)));
    }
View Full Code Here

                    }
                }

                if (splitbyte < rlen) {
                    ByteArrayInputStream splitInputStream = new ByteArrayInputStream(buf, splitbyte, rlen - splitbyte);
                    SequenceInputStream sequenceInputStream = new SequenceInputStream(splitInputStream, inputStream);
                    inputStream = sequenceInputStream;
                }

                parms = new HashMap<String, String>();
                headers = new HashMap<String, String>();
View Full Code Here

            }

            InputStream in = new ByteArrayInputStream(headers);
            try {
                if (sr != null) {
                    in = new SequenceInputStream(in, sr.get(key));
                }
            } catch (Exception e) {
                //ignore this... either sr is null, or the file does not exist
                // or something else
            }
View Full Code Here

        // if headers do not contains minimum REQUIRED headers fields throw Exception
        if (!headers.isValid()) {
            throw new MessagingException("Some REQURED header field is missing. Invalid Message");
        }
        ByteArrayInputStream headersIn = new ByteArrayInputStream(headers.toByteArray());
        sendMail(new MailImpl(getId(), sender, recipients, new SequenceInputStream(headersIn, msg)));
    }
View Full Code Here

TOP

Related Classes of java.io.SequenceInputStream

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.