public abstract class ContentStreamBase extends Object implements ContentStream
Modifier and Type | Class and Description |
---|---|
static class |
ContentStreamBase.ByteArrayStream
Construct a
ContentStream from a File |
static class |
ContentStreamBase.FileStream
Construct a
ContentStream from a File |
static class |
ContentStreamBase.StringStream
Construct a
ContentStream from a String |
static class |
ContentStreamBase.URLStream
Construct a
ContentStream from a URL
This uses a URLConnection to get the content stream |
Modifier and Type | Field and Description |
---|---|
protected String |
contentType |
static String |
DEFAULT_CHARSET |
protected String |
name |
protected Long |
size |
protected String |
sourceInfo |
Constructor and Description |
---|
ContentStreamBase() |
Modifier and Type | Method and Description |
---|---|
static ContentStream |
create(RequestWriter requestWriter,
SolrRequest req) |
static String |
getCharsetFromContentType(String contentType) |
String |
getContentType() |
String |
getName() |
Reader |
getReader()
Base reader implementation.
|
Long |
getSize() |
String |
getSourceInfo() |
void |
setContentType(String contentType) |
void |
setName(String name) |
void |
setSize(Long size) |
void |
setSourceInfo(String sourceInfo) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStream
public static final String DEFAULT_CHARSET
protected String name
protected String sourceInfo
protected String contentType
protected Long size
public Reader getReader() throws IOException
getReader
in interface ContentStream
IOException
public String getContentType()
getContentType
in interface ContentStream
public void setContentType(String contentType)
public String getName()
getName
in interface ContentStream
public void setName(String name)
public Long getSize()
getSize
in interface ContentStream
null
if not knownpublic void setSize(Long size)
public String getSourceInfo()
getSourceInfo
in interface ContentStream
public void setSourceInfo(String sourceInfo)
public static ContentStream create(RequestWriter requestWriter, SolrRequest req) throws IOException
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.