本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例7: skip
import org.apache.cassandra.io.util.FileUtils; //导入方法依赖的package包/类
public void skip(DataInput in) throws IOException
{
FileUtils.skipBytesFully(in, 4 + 8);
}
示例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);
}
示例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);
}