if (input instanceof Seekable) {
final Seekable seekable = (Seekable) input;
return new SeekableInputStream(input) {
@Override
public void seek(long pos) throws IOException {
seekable.seek(pos);
}
@Override
public long getPos() throws IOException {
return seekable.getPos();