Package org.sonar.python.caching
Class PythonReadCacheImpl
- java.lang.Object
-
- org.sonar.python.caching.PythonReadCacheImpl
-
- All Implemented Interfaces:
PythonReadCache
public class PythonReadCacheImpl extends Object implements PythonReadCache
-
-
Constructor Summary
Constructors Constructor Description PythonReadCacheImpl(org.sonar.api.batch.sensor.cache.ReadCache readCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(String key)Checks whether the cache contains the providedkey.InputStreamread(String key)Returns an input stream for the data cached with the providedkey.byte[]readBytes(String key)
-
-
-
Method Detail
-
read
public InputStream read(String key)
Description copied from interface:PythonReadCacheReturns an input stream for the data cached with the providedkey. It is the responsibility of the caller to close the stream.- Specified by:
readin interfacePythonReadCache
-
readBytes
@CheckForNull public byte[] readBytes(String key)
- Specified by:
readBytesin interfacePythonReadCache- Returns:
- the array of bytes stored for the given key, if any.
nullotherwise.
-
contains
public boolean contains(String key)
Description copied from interface:PythonReadCacheChecks whether the cache contains the providedkey.- Specified by:
containsin interfacePythonReadCache
-
-