當前位置: 首頁>>代碼示例>>Java>>正文


Java ByteArrayDataInput.readBoolean方法代碼示例

本文整理匯總了Java中com.google.common.io.ByteArrayDataInput.readBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java ByteArrayDataInput.readBoolean方法的具體用法?Java ByteArrayDataInput.readBoolean怎麽用?Java ByteArrayDataInput.readBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.common.io.ByteArrayDataInput的用法示例。


在下文中一共展示了ByteArrayDataInput.readBoolean方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: read

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
@Override
public void read(ByteArrayDataInput in)
{
    super.read(in);
    orientation = in.readInt();
    validMultiblock = in.readBoolean();
    selectedModule = in.readUTF();
    selectedChipset = in.readUTF();
    armorId = in.readInt();
    progressing = in.readBoolean();
    progress = in.readInt();
    if (in.readBoolean())
    {
        energyPos = new Vector3(in.readInt(), in.readInt(), in.readInt());
    }
}
 
開發者ID:PaleoCrafter,項目名稱:R0b0ts,代碼行數:17,代碼來源:PacketFactoryController.java

示例2: readPatch

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
private ClassPatch readPatch(JarEntry entry, JarInputStream jis){
    ByteArrayDataInput input;
    try{
        input = ByteStreams.newDataInput(ByteStreams.toByteArray(jis));
    }catch(IOException e){
        logger.warn("Unable to read binpatch file {}. Ignoring it", entry.getName());
        return null;
    }
    String name = input.readUTF();
    String sourceName = input.readUTF();
    String targetName = input.readUTF();
    boolean exists = input.readBoolean();
    int inputChecksum = exists ? input.readInt() : 0;
    int patchLength = input.readInt();
    byte[] patchBytes = new byte[patchLength];
    input.readFully(patchBytes);

    return new ClassPatch(name, sourceName, targetName, exists, inputChecksum, patchBytes);
}
 
開發者ID:nailed,項目名稱:nailed,代碼行數:20,代碼來源:BinPatchManager.java

示例3: onPluginMessageReceived

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
@SuppressWarnings("deprecation")
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] message) {
	if (!channel.equals(BungeeSayNoToMcLeaks.CHANNEL)) return;
	
	ByteArrayDataInput in = ByteStreams.newDataInput(message);
    String subchannel = in.readUTF();
    if (subchannel.equals(BungeeSayNoToMcLeaks.SUBCHANNEL)) {
    	final String name = in.readUTF();
    	final boolean result = in.readBoolean();
    	
    	// S'il est déjà connu
    	if (this.caches.getIfPresent(name) != null) return;
    	
    	this.caches.put(name, result);
    	// Si les 2 IP correspondent
    	if (result) {
			this.plugin.debug("The player " + name + " doesn't use alt account.");
			
		// Les 2 IP ne correspondent pas
		} else {
			// Si le joueur est déjà connecté
			if (this.plugin.getServer().getPlayer(name) != null) {
				this.executeCommands(name, 100);
			}
		}
    }
	
}
 
開發者ID:EverCraft,項目名稱:SayNoToMcLeaks,代碼行數:30,代碼來源:ManagerBungee.java

示例4: readPatch

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
private ClassPatch readPatch(JarEntry patchEntry, JarInputStream jis)
{
    if (DEBUG)
        FMLRelaunchLog.finer("Reading patch data from %s", patchEntry.getName());
    ByteArrayDataInput input;
    try
    {
        input = ByteStreams.newDataInput(ByteStreams.toByteArray(jis));
    }
    catch (IOException e)
    {
        FMLRelaunchLog.log(Level.WARN, e, "Unable to read binpatch file %s - ignoring", patchEntry.getName());
        return null;
    }
    String name = input.readUTF();
    String sourceClassName = input.readUTF();
    String targetClassName = input.readUTF();
    boolean exists = input.readBoolean();
    int inputChecksum = 0;
    if (exists)
    {
        inputChecksum = input.readInt();
    }
    int patchLength = input.readInt();
    byte[] patchBytes = new byte[patchLength];
    input.readFully(patchBytes);

    return new ClassPatch(name, sourceClassName, targetClassName, exists, inputChecksum, patchBytes);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:30,代碼來源:ClassPatchManager.java

示例5: reduce

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
@Override
protected void reduce(final Text key, final Iterable<LongWritable> values, final Context context) throws IOException, InterruptedException {
    long count = 0;
    for (final LongWritable lw : values) {
        count += lw.get();
    }

    if (count <= TOO_LOW) {
        return;
    }

    final ByteArrayDataInput badi = ByteStreams.newDataInput(key.getBytes());
    final String v = badi.readUTF();
    cat_txt.set(badi.readUTF());

    Text columnQualifier = RdfCloudTripleStoreConstants.EMPTY_TEXT;
    final boolean includesContext = badi.readBoolean();
    if (includesContext) {
        columnQualifier = new Text(badi.readUTF());
    }

    row.set(v);
    final Mutation m = new Mutation(row);
    v_out.set((count + "").getBytes(StandardCharsets.UTF_8));
    m.put(cat_txt, columnQualifier, cv, v_out);
    context.write(table, m);
}
 
開發者ID:apache,項目名稱:incubator-rya,代碼行數:28,代碼來源:AccumuloRdfCountTool.java

示例6: readPatch

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
private ClassPatch readPatch(JarEntry patchEntry, JarInputStream jis)
{
    FMLRelaunchLog.finer("Reading patch data from %s", patchEntry.getName());
    ByteArrayDataInput input;
    try
    {
        input = ByteStreams.newDataInput(ByteStreams.toByteArray(jis));
    }
    catch (IOException e)
    {
        FMLRelaunchLog.log(Level.WARN, e, "Unable to read binpatch file %s - ignoring", patchEntry.getName());
        return null;
    }
    String name = input.readUTF();
    String sourceClassName = input.readUTF();
    String targetClassName = input.readUTF();
    boolean exists = input.readBoolean();
    int inputChecksum = 0;
    if (exists)
    {
        inputChecksum = input.readInt();
    }
    int patchLength = input.readInt();
    byte[] patchBytes = new byte[patchLength];
    input.readFully(patchBytes);

    return new ClassPatch(name, sourceClassName, targetClassName, exists, inputChecksum, patchBytes);
}
 
開發者ID:alexandrage,項目名稱:CauldronGit,代碼行數:29,代碼來源:ClassPatchManager.java

示例7: read

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
@Override
public void read(ByteArrayDataInput in) {
    windowId = in.readInt();
    marketId = in.readInt();
    cartIndex = in.readInt();

    int itemId = in.readInt();
    int stackSize = in.readInt();
    int damage = in.readInt();

    Item item = (Item)Item.itemRegistry.getObjectById(itemId);
    itemToAddOrUpdate = new ItemStack(item, stackSize, damage);

    addIfUnlocated = in.readBoolean();
}
 
開發者ID:CannibalVox,項目名稱:ModJamTeleporters,代碼行數:16,代碼來源:TransmitCartUpdatePacket.java

示例8: read

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
@Override
public void read(ByteArrayDataInput in)
{
    super.read(in);
    energy = in.readInt();
    currentRate = in.readInt();
    boolean available = in.readBoolean();
    if (available)
    {
        controllerPos = new Vector3(in.readInt(), in.readInt(), in.readInt());
    }
}
 
開發者ID:PaleoCrafter,項目名稱:R0b0ts,代碼行數:13,代碼來源:PacketFactoryEnergy.java

示例9: readPatch

import com.google.common.io.ByteArrayDataInput; //導入方法依賴的package包/類
private ClassPatch readPatch(JarEntry patchEntry, JarInputStream jis)
{
    FMLRelaunchLog.finest("Reading patch data from %s", patchEntry.getName());
    ByteArrayDataInput input;
    try
    {
        input = ByteStreams.newDataInput(ByteStreams.toByteArray(jis));
    }
    catch (IOException e)
    {
        FMLRelaunchLog.log(Level.WARNING, e, "Unable to read binpatch file %s - ignoring", patchEntry.getName());
        return null;
    }
    String name = input.readUTF();
    String sourceClassName = input.readUTF();
    String targetClassName = input.readUTF();
    boolean exists = input.readBoolean();
    int inputChecksum = 0;
    if (exists)
    {
        inputChecksum = input.readInt();
    }
    int patchLength = input.readInt();
    byte[] patchBytes = new byte[patchLength];
    input.readFully(patchBytes);

    return new ClassPatch(name, sourceClassName, targetClassName, exists, inputChecksum, patchBytes);
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:29,代碼來源:ClassPatchManager.java


注:本文中的com.google.common.io.ByteArrayDataInput.readBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。