|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.solr.util.ContentStreamBase
org.apache.solr.util.ContentStreamBase.FileStream
public static class ContentStreamBase.FileStream
Construct a ContentStream from a File
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.solr.util.ContentStreamBase |
|---|
ContentStreamBase.FileStream, ContentStreamBase.StringStream, ContentStreamBase.URLStream |
| Field Summary |
|---|
| Fields inherited from class org.apache.solr.util.ContentStreamBase |
|---|
contentType, DEFAULT_CHARSET, name, size, sourceInfo |
| Constructor Summary | |
|---|---|
ContentStreamBase.FileStream(java.io.File f)
|
|
| Method Summary | |
|---|---|
java.io.Reader |
getReader()
If an charset is defined (by the contentType) ues that, otherwise use a file reader |
java.io.InputStream |
getStream()
Get an open stream. |
| Methods inherited from class org.apache.solr.util.ContentStreamBase |
|---|
getCharsetFromContentType, getContentType, getName, getSize, getSourceInfo, setContentType, setName, setSize, setSourceInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContentStreamBase.FileStream(java.io.File f)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public java.io.InputStream getStream()
throws java.io.IOException
ContentStream
InputStream stream = stream.getStream();
try {
// use the stream...
}
finally {
IOUtils.closeQuietly(reader);
}
Only the first call to getStream() or getReader()
is gaurenteed to work. The runtime behavior for aditional calls is undefined.
java.io.IOException
public java.io.Reader getReader()
throws java.io.IOException
getReader in interface ContentStreamgetReader in class ContentStreamBasejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||