Package org.apache.solr.common.util
Interface ContentStream
-
- All Known Implementing Classes:
ContentStreamBase
,ContentStreamBase.ByteArrayStream
,ContentStreamBase.FileStream
,ContentStreamBase.StringStream
,ContentStreamBase.URLStream
@Deprecated public interface ContentStream
Deprecated.UseRequestWriter.ContentWriter
instead.- Since:
- solr 1.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
getContentType()
Deprecated.String
getName()
Deprecated.Reader
getReader()
Deprecated.Get an open stream.Long
getSize()
Deprecated.String
getSourceInfo()
Deprecated.InputStream
getStream()
Deprecated.Get an open stream.
-
-
-
Method Detail
-
getName
String getName()
Deprecated.
-
getSourceInfo
String getSourceInfo()
Deprecated.
-
getContentType
String getContentType()
Deprecated.
-
getSize
Long getSize()
Deprecated.- Returns:
- the stream size or
null
if not known
-
getStream
InputStream getStream() throws IOException
Deprecated.Get an open stream. You are responsible for closing it. Consider using something like:InputStream stream = stream.getStream(); try { // use the stream... } finally { IOUtils.closeQuietly(stream); }
Only the first call togetStream()
orgetReader()
is guaranteed to work. The runtime behavior for additional calls is undefined.Note: you must call
getStream()
orgetReader()
before the attributes (name, contentType, etc) are guaranteed to be set. Streams may be lazy loaded only when this method is called.- Throws:
IOException
-
getReader
Reader getReader() throws IOException
Deprecated.Get an open stream. You are responsible for closing it. Consider using something like:Reader reader = stream.getReader(); try { // use the reader... } finally { IOUtils.closeQuietly(reader); }
Only the first call togetStream()
orgetReader()
is guaranteed to work. The runtime behavior for additional calls is undefined.Note: you must call
getStream()
orgetReader()
before the attributes (name, contentType, etc) are guaranteed to be set. Streams may be lazy loaded only when this method is called.- Throws:
IOException
-
-