not extendings FilterInputStream but implementing directly to avoid performance overhead
Merge branch 'WorkingAroundConnectionsReleasing' into integration