public abstract class ContentStreamBase extends Object implements ContentStream
| 限定符和类型 | 类和说明 |
|---|---|
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 |
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
contentType |
static String |
DEFAULT_CHARSET |
protected String |
name |
protected Long |
size |
protected String |
sourceInfo |
| 构造器和说明 |
|---|
ContentStreamBase() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 ContentStreamIOExceptionpublic String getContentType()
getContentType 在接口中 ContentStreampublic void setContentType(String contentType)
public String getName()
getName 在接口中 ContentStreampublic void setName(String name)
public Long getSize()
getSize 在接口中 ContentStreamnull if not knownpublic void setSize(Long size)
public String getSourceInfo()
getSourceInfo 在接口中 ContentStreampublic void setSourceInfo(String sourceInfo)
public static ContentStream create(RequestWriter requestWriter, SolrRequest req) throws IOException
IOExceptionCopyright © 2006–2022 The Apache Software Foundation. All rights reserved.