Class HttpPoster.RepositoryDocumentStream

  • All Implemented Interfaces:
    org.apache.solr.common.util.ContentStream
    Enclosing class:
    HttpPoster

    protected static class HttpPoster.RepositoryDocumentStream
    extends org.apache.solr.common.util.ContentStreamBase
    Class for importing documents into Solr via SolrJ
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.solr.common.util.ContentStreamBase

        org.apache.solr.common.util.ContentStreamBase.ByteArrayStream, org.apache.solr.common.util.ContentStreamBase.FileStream, org.apache.solr.common.util.ContentStreamBase.StringStream, org.apache.solr.common.util.ContentStreamBase.URLStream
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String contentName  
      protected java.lang.String contentType  
      protected java.io.InputStream is  
      protected long length  
      • Fields inherited from class org.apache.solr.common.util.ContentStreamBase

        APPLICATION_GZIP, APPLICATION_JSON, APPLICATION_OCTET_STREAM, APPLICATION_XML, DEFAULT_CHARSET, name, size, sourceInfo, TEXT_XML
    • Constructor Summary

      Constructors 
      Constructor Description
      RepositoryDocumentStream​(java.io.InputStream is, long length, java.lang.String contentType, java.lang.String contentName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getContentType()  
      java.lang.String getName()  
      java.io.Reader getReader()  
      java.lang.Long getSize()  
      java.io.InputStream getStream()  
      • Methods inherited from class org.apache.solr.common.util.ContentStreamBase

        attemptToDetermineContentType, create, getCharsetFromContentType, getSourceInfo, setContentType, setName, setSize, setSourceInfo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • is

        protected final java.io.InputStream is
      • length

        protected final long length
      • contentType

        protected final java.lang.String contentType
      • contentName

        protected final java.lang.String contentName
    • Constructor Detail

      • RepositoryDocumentStream

        public RepositoryDocumentStream​(java.io.InputStream is,
                                        long length,
                                        java.lang.String contentType,
                                        java.lang.String contentName)
    • Method Detail

      • getSize

        public java.lang.Long getSize()
        Specified by:
        getSize in interface org.apache.solr.common.util.ContentStream
        Overrides:
        getSize in class org.apache.solr.common.util.ContentStreamBase
      • getStream

        public java.io.InputStream getStream()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getReader

        public java.io.Reader getReader()
                                 throws java.io.IOException
        Specified by:
        getReader in interface org.apache.solr.common.util.ContentStream
        Overrides:
        getReader in class org.apache.solr.common.util.ContentStreamBase
        Throws:
        java.io.IOException
      • getContentType

        public java.lang.String getContentType()
        Specified by:
        getContentType in interface org.apache.solr.common.util.ContentStream
        Overrides:
        getContentType in class org.apache.solr.common.util.ContentStreamBase
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.apache.solr.common.util.ContentStream
        Overrides:
        getName in class org.apache.solr.common.util.ContentStreamBase