Package java.io

Examples of java.io.SequenceInputStream


            Vector<InputStream> v = new Vector<InputStream>(3);
            v.add(leaderStream);
            v.add(resource.openStream());
            v.add(trailerStream);

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


         remaining -= c;
         if (remaining == 0) {
            break;
         }
      }
      return new SequenceInputStream(Collections.enumeration(list));
   }
View Full Code Here

    boolean success = _trailFileLocator.fetchOneTime();

    if ( ! success )
      return ;

    _seqStream = new SequenceInputStream(_streamEnumerator);

    if ( ! _staticStream)
      _trailFileLocator.start(); // Note: TrailFileLocator needs to be started only after seqStream is constructed.
    _initDone = true;
  }
View Full Code Here

                                               _fileInputStream,
                                               new ByteArrayInputStream(xmlEndTag.getBytes(DbusConstants.ISO_8859_1)),
                                           });

      Enumeration<InputStream> streams = Collections.enumeration(xmlTagsList);
      SequenceInputStream seqStream = new SequenceInputStream(streams);
      XMLInputFactory factory =  XMLInputFactory.newInstance();
      factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
      XMLStreamReader xmlStreamReader = factory.createXMLStreamReader(seqStream);

      XmlParser parser = new XmlParser(xmlStreamReader, _schemaRegistry, _tableToNamespace, _tableToSourceId, _transactionSuccessCallBack, true,_staticReplicationConfig, seqStream);   //TODO replace _tableToNamespace this by physical sources config
View Full Code Here

                                             new ByteArrayInputStream(xmlStart.getBytes(Charset.forName("ISO-8859-1"))),
                                             compositeInputStream,
                                             new ByteArrayInputStream(xmlEnd.getBytes(Charset.forName("ISO-8859-1"))),
                                         });
    Enumeration<InputStream> streams = Collections.enumeration(xmlTagsList);
    SequenceInputStream seqStream = new SequenceInputStream(streams);
    return seqStream;
  }
View Full Code Here

    public static void executeDsl(String[] fileNames, InputStream[] inputStreams) {
        InputStream inputStream = inputStreams[0];

        for ( int i = 1; i < inputStreams.length; i++ ) {
            assertNotNull( inputStreams[i] );
            inputStream = new SequenceInputStream( inputStream,
                                                   inputStreams[i] );
        }

        executeDsl( Arrays.toString( fileNames ), inputStream );
    }
View Full Code Here

            //only copy up to the limit since that's all we need to log
            //we can stream the rest
            IOUtils.copyAtLeast(bis, bos, limit);
            bos.flush();
            bis = new SequenceInputStream(bos.getInputStream(), bis);
           
            // restore the delegating input stream or the input stream
            if (is instanceof DelegatingInputStream) {
                ((DelegatingInputStream)is).setInputStream(bis);
            } else {
View Full Code Here

            byte[] data = new byte[pos];
            System.arraycopy(buffer, 0, data, 0, pos);
            return BLOBInMemory.getInstance(data);
        } else {
            // a few bytes are already read, need to re-build the input stream
            in = new SequenceInputStream(new ByteArrayInputStream(buffer, 0, pos), in);
            if (store != null) {
                return BLOBInDataStore.getInstance(store, in);
            } else {
                return BLOBInTempFile.getInstance(in, temporary);
            }
View Full Code Here

                public InputStream nextElement() {
                    return streams[index++];
               
               
            };
            return new SequenceInputStream(list);
        } else {
            return is;
        }
                
    }
View Full Code Here

         if (stream_handler != null)
            stream_handler.markForClose(this);

         if (Version.equals("HTTP/0.9"))
         {
            inp_stream = new SequenceInputStream(new ByteArrayInputStream(Data), inp_stream);
            Data = null;
         }
      }

      if (cd_type == CD_CONTLEN)
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.