当前位置: 首页>>代码示例>>Java>>正文


Java FileUtils.skipBytesFully方法代码示例

本文整理汇总了Java中org.apache.cassandra.io.util.FileUtils.skipBytesFully方法的典型用法代码示例。如果您正苦于以下问题:Java FileUtils.skipBytesFully方法的具体用法?Java FileUtils.skipBytesFully怎么用?Java FileUtils.skipBytesFully使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.cassandra.io.util.FileUtils的用法示例。


在下文中一共展示了FileUtils.skipBytesFully方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: skipIndex

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
/**
 * Skip the index
 * @param in the data input from which the index should be skipped
 * @throws IOException if an I/O error occurs.
 */
public static void skipIndex(DataInput in) throws IOException
{
    /* read only the column index list */
    int columnIndexSize = in.readInt();
    /* skip the column index data */
    if (in instanceof FileDataInput)
    {
        FileUtils.skipBytesFully(in, columnIndexSize);
    }
    else
    {
        // skip bytes
        byte[] skip = new byte[columnIndexSize];
        in.readFully(skip);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:22,代码来源:IndexHelper.java

示例2: skipData

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
/**
 * Skip data field on index entry.
 *
 * @throws IOException
 */
private void skipData() throws IOException {
    int length = reader.readInt();
    if (length > 0) {
        FileUtils.skipBytesFully(reader, length);
    }
}
 
开发者ID:instaclustr,项目名称:cassandra-sstable-tools,代码行数:12,代码来源:IndexReader.java

示例3: skipShortLength

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
/**
 * @param in data input
 * @return null
 * @throws IOException if an I/O error occurs.
 */
public static ByteBuffer skipShortLength(DataInput in) throws IOException
{
    int skip = readShortLength(in);
    FileUtils.skipBytesFully(in, skip);
    return null;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:12,代码来源:ByteBufferUtil.java

示例4: skipColumnBody

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
void skipColumnBody(DataInput in, int mask) throws IOException
{
    if ((mask & COUNTER_MASK) != 0)
        FileUtils.skipBytesFully(in, 16);
    else if ((mask & EXPIRATION_MASK) != 0)
        FileUtils.skipBytesFully(in, 16);
    else
        FileUtils.skipBytesFully(in, 8);

    int length = in.readInt();
    FileUtils.skipBytesFully(in, length);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:13,代码来源:ColumnSerializer.java

示例5: skipPromotedIndex

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
public static void skipPromotedIndex(DataInput in) throws IOException
{
    int size = in.readInt();
    if (size <= 0)
        return;

    FileUtils.skipBytesFully(in, size);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:9,代码来源:RowIndexEntry.java

示例6: skipPromotedIndex

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
public void skipPromotedIndex(DataInput in) throws IOException
{
    int size = in.readInt();
    if (size <= 0)
        return;

    FileUtils.skipBytesFully(in, size);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:9,代码来源:RowIndexEntry.java

示例7: skip

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
public void skip(DataInput in) throws IOException
{
    FileUtils.skipBytesFully(in, 4 + 8);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:DeletionTime.java

示例8: read

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
public static <T2> MessageIn<T2> read(DataInput in, int version, int id) throws IOException
{
    InetAddress from = CompactEndpointSerializationHelper.deserialize(in);

    MessagingService.Verb verb = MessagingService.Verb.values()[in.readInt()];
    int parameterCount = in.readInt();
    Map<String, byte[]> parameters;
    if (parameterCount == 0)
    {
        parameters = Collections.emptyMap();
    }
    else
    {
        ImmutableMap.Builder<String, byte[]> builder = ImmutableMap.builder();
        for (int i = 0; i < parameterCount; i++)
        {
            String key = in.readUTF();
            byte[] value = new byte[in.readInt()];
            in.readFully(value);
            builder.put(key, value);
        }
        parameters = builder.build();
    }

    int payloadSize = in.readInt();
    IVersionedSerializer<T2> serializer = (IVersionedSerializer<T2>) MessagingService.verbSerializers.get(verb);
    if (serializer instanceof MessagingService.CallbackDeterminedSerializer)
    {
        CallbackInfo callback = MessagingService.instance().getRegisteredCallback(id);
        if (callback == null)
        {
            // reply for expired callback.  we'll have to skip it.
            FileUtils.skipBytesFully(in, payloadSize);
            return null;
        }
        serializer = (IVersionedSerializer<T2>) callback.serializer;
    }
    if (payloadSize == 0 || serializer == null)
        return create(from, null, parameters, verb, version);
    T2 payload = serializer.deserialize(in, version);
    return MessageIn.create(from, payload, parameters, verb, version);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:43,代码来源:MessageIn.java

示例9: skipBloomFilter

import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
public static void skipBloomFilter(DataInput in) throws IOException
{
    int size = in.readInt();
    FileUtils.skipBytesFully(in, size);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:6,代码来源:IndexHelper.java


注:本文中的org.apache.cassandra.io.util.FileUtils.skipBytesFully方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。