本文整理了Java中org.apache.jackrabbit.oak.commons.IOUtils.readVarLong()
方法的一些代码示例,展示了IOUtils.readVarLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOUtils.readVarLong()
方法的具体详情如下:
包路径:org.apache.jackrabbit.oak.commons.IOUtils
类名称:IOUtils
方法名:readVarLong
[英]Read a variable size long.
[中]读取可变大小的长文件。
代码示例来源:origin: org.apache.jackrabbit/oak-mk
@Override
public long readLongValue(String key) throws Exception {
if (in == null) {
throw new IllegalStateException("no InputStream provided");
}
return IOUtils.readVarLong(in);
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: apache/jackrabbit-oak
IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: org.apache.jackrabbit/oak-blob
IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: org.apache.jackrabbit/oak-blob
totalLength += IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: apache/jackrabbit-oak
totalLength += IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
totalLength += IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: apache/jackrabbit-oak
IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: org.apache.jackrabbit/oak-blob
IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: apache/jackrabbit-oak
public void testVarEOF() throws IOException {
try {
IOUtils.readVarInt(new ByteArrayInputStream(new byte[0]));
fail();
} catch (EOFException e) {
// expected
}
try {
IOUtils.readVarLong(new ByteArrayInputStream(new byte[0]));
fail();
} catch (EOFException e) {
// expected
}
}
代码示例来源:origin: apache/jackrabbit-oak
private static void testVarLong(long x, int expectedLen) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
IOUtils.writeVarLong(out, x);
byte[] data = out.toByteArray();
assertTrue(data.length <= 10);
if (expectedLen > 0) {
assertEquals(expectedLen, data.length);
}
ByteArrayInputStream in = new ByteArrayInputStream(data);
long x2 = IOUtils.readVarLong(in);
assertEquals(x, x2);
assertEquals(-1, in.read());
}
代码示例来源:origin: apache/jackrabbit-oak
long totalLength = IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
long totalLength = IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: org.apache.jackrabbit/oak-blob
long totalLength = IOUtils.readVarLong(idStream);
if (level > 0) {
IOUtils.readVarLong(idStream);
代码示例来源:origin: apache/jackrabbit-oak
assertEquals(0, IOUtils.readVarLong(in));
assertEquals(-1, in.read());
内容来源于网络,如有侵权,请联系作者删除!