com.kolibrifx.plovercrest.server.internal.folds.ByteArrayPeekableInputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plovercrest-server Show documentation
Show all versions of plovercrest-server Show documentation
Plovercrest server library.
The newest version!
/*
* Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
*/
package com.kolibrifx.plovercrest.server.internal.folds;
import java.nio.ByteBuffer;
import com.kolibrifx.plovercrest.server.streams.Stream;
public class ByteArrayPeekableInputStream extends AbstractPeekableInputStream {
public ByteArrayPeekableInputStream(final Stream stream, final long fromTimestamp) {
super(stream, fromTimestamp);
}
@Override
protected byte[] convertElement(final ByteBuffer element) {
final byte[] bytes = new byte[element.remaining()];
element.get(bytes);
return bytes;
}
}