use of org.commonjava.maven.galley.io.nocache.NoCacheInputStream in project galley by Commonjava.
the class NoCacheTransferDecorator method decorateRead.
@Override
public InputStream decorateRead(final InputStream stream, final Transfer transfer, final EventMetadata eventMetadata) throws IOException {
SpecialPathInfo specialPathInfo = specialPathManager.getSpecialPathInfo(transfer, eventMetadata.getPackageType());
logger.trace("SpecialPathInfo for: {} is: {} (cachable? {})", transfer, specialPathInfo, (specialPathInfo == null ? true : specialPathInfo.isCachable()));
if (specialPathInfo != null && !specialPathInfo.isCachable()) {
logger.trace("Decorating read with NoCacheTransferDecorator for: {}", transfer);
return new NoCacheInputStream(stream, transfer);
}
return stream;
}
Aggregations