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 |
|---|---|
protected String |
attemptToDetermineContentType() |
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, waitgetStreampublic static final String DEFAULT_CHARSET
protected String name
protected String sourceInfo
protected String contentType
protected Long size
protected String attemptToDetermineContentType()
public Reader getReader() throws IOException
getReader in interface ContentStreamIOExceptionpublic String getContentType()
getContentType in interface ContentStreampublic void setContentType(String contentType)
public String getName()
getName in interface ContentStreampublic void setName(String name)
public Long getSize()
getSize in interface ContentStreamnull if not knownpublic void setSize(Long size)
public String getSourceInfo()
getSourceInfo in interface ContentStreampublic void setSourceInfo(String sourceInfo)
public static ContentStream create(RequestWriter requestWriter, SolrRequest req) throws IOException
IOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.