Class BufferedWritableResource
java.lang.Object
org.apache.maven.index.reader.resource.BufferedResource
org.apache.maven.index.reader.resource.BufferedWritableResource
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- ResourceHandler.Resource,- WritableResourceHandler.WritableResource
public class BufferedWritableResource
extends BufferedResource
implements WritableResourceHandler.WritableResource
Wraps 
WritableResourceHandler.WritableResources so that they return BufferedInputStreams and BufferedOutputStreams.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Default close method is no-op, override if implementation requires.write()Returns theOutputStreamstream of the resource, if exists, it will replace the existing content, or if not exists, the resource will be created.Methods inherited from class org.apache.maven.index.reader.resource.BufferedResourcereadMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.index.reader.ResourceHandler.Resourceread
- 
Constructor Details- 
BufferedWritableResource
 
- 
- 
Method Details- 
writeDescription copied from interface:WritableResourceHandler.WritableResourceReturns theOutputStreamstream of the resource, if exists, it will replace the existing content, or if not exists, the resource will be created. The stream should be closed by caller, otherwise resource leaks might be introduced. How and when content is written is left to implementation, but it is guaranteed that this method is called only once, and will be followed byResourceHandler.Resource.close()on the resource itself. Implementation does not have to be "read consistent", in a way to worry what subsequentResourceHandler.Resource.read()method will return, as mixed calls will not happen on same instance of resource.- Specified by:
- writein interface- WritableResourceHandler.WritableResource
- Throws:
- IOException
 
- 
closeDescription copied from interface:ResourceHandler.ResourceDefault close method is no-op, override if implementation requires.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- ResourceHandler.Resource
- Overrides:
- closein class- BufferedResource
- Throws:
- IOException
 
 
-