mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-07 08:58:20 +01:00
757 lines
35 KiB
HTML
757 lines
35 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>BinaryWriter (Minestom 1.0 API)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="description" content="declaration: package: net.minestom.server.utils.binary, class: BinaryWriter">
|
|
<meta name="generator" content="javadoc/ClassWriterImpl">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.css" title="Style">
|
|
<script type="text/javascript" src="../../../../../script.js"></script>
|
|
<script type="text/javascript" src="../../../../../script-dir/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../../../../script-dir/jquery-3.4.1.js"></script>
|
|
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.js"></script>
|
|
</head>
|
|
<body class="class-declaration">
|
|
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../../../../";
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<div class="flexBox">
|
|
<header role="banner" class="flexHeader">
|
|
<nav role="navigation">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a id="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="navListSearch"><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<div class="skipNav"><a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
</nav>
|
|
</header>
|
|
<div class="flexContent">
|
|
<main role="main">
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">net.minestom.server.utils.binary</a></div>
|
|
<h1 title="Class BinaryWriter" class="title">Class BinaryWriter</h1>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
|
<div class="inheritance">java.io.OutputStream
|
|
<div class="inheritance">net.minestom.server.utils.binary.BinaryWriter</div>
|
|
</div>
|
|
</div>
|
|
<section class="description">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><code>java.io.Closeable</code>, <code>java.io.Flushable</code>, <code>java.lang.AutoCloseable</code></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public class <span class="typeNameLabel">BinaryWriter</span>
|
|
extends java.io.OutputStream</pre>
|
|
<div class="block">Class used to write to a byte array.
|
|
WARNING: not thread-safe.</div>
|
|
</section>
|
|
<section class="summary">
|
|
<ul class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<li class="blockList">
|
|
<section class="constructorSummary"><a id="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h2>Constructor Summary</h2>
|
|
<div class="memberSummary">
|
|
<table>
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<thead>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Constructor</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">BinaryWriter</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> with a "reasonably small initial capacity".</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int)">BinaryWriter</a></span>​(int initialCapacity)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> using a heap buffer with a custom initial capacity.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(io.netty.buffer.ByteBuf...)">BinaryWriter</a></span>​(io.netty.buffer.ByteBuf... buffers)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> from multiple buffers.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</li>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<li class="blockList">
|
|
<section class="methodSummary"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h2>Method Summary</h2>
|
|
<div class="memberSummary">
|
|
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
|
|
<div id="memberSummary_tabpanel" role="tabpanel">
|
|
<table aria-labelledby="t0">
|
|
<thead>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="altColor" id="i0">
|
|
<td class="colFirst"><code>io.netty.buffer.ByteBuf</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBuffer()">getBuffer</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Gets the raw buffer used by this binary writer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i1">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBuffer(io.netty.buffer.ByteBuf)">setBuffer</a></span>​(io.netty.buffer.ByteBuf buffer)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Changes the buffer used by this binary writer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i2">
|
|
<td class="colFirst"><code>byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toByteArray()">toByteArray</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts the internal buffer to a byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i3">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(int)">write</a></span>​(int b)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr class="altColor" id="i4">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(java.util.function.Consumer)">write</a></span>​(java.util.function.Consumer<<a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary">BinaryWriter</a>> consumer)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Consumer this object to write at a different time</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i5">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeAtEnd(net.minestom.server.utils.binary.BinaryWriter)">writeAtEnd</a></span>​(<a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary">BinaryWriter</a> footerWriter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a>'s <code>ByteBuf</code> at the end of this writer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i6">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeAtStart(net.minestom.server.utils.binary.BinaryWriter)">writeAtStart</a></span>​(<a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary">BinaryWriter</a> headerWriter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a>'s <code>ByteBuf</code> at the beginning of this writer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i7">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBlockPosition(int,int,int)">writeBlockPosition</a></span>​(int x,
|
|
int y,
|
|
int z)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr class="altColor" id="i8">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBlockPosition(net.minestom.server.utils.BlockPosition)">writeBlockPosition</a></span>​(<a href="../BlockPosition.html" title="class in net.minestom.server.utils">BlockPosition</a> blockPosition)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr class="rowColor" id="i9">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBoolean(boolean)">writeBoolean</a></span>​(boolean b)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single boolean to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i10">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeByte(byte)">writeByte</a></span>​(byte b)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single byte to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i11">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(byte%5B%5D)">writeBytes</a></span>​(byte[] bytes)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i12">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeChar(char)">writeChar</a></span>​(char c)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single char to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i13">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeDouble(double)">writeDouble</a></span>​(double d)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single double to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i14">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeFloat(float)">writeFloat</a></span>​(float f)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single float to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i15">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeInt(int)">writeInt</a></span>​(int i)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single int to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i16">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeItemStack(net.minestom.server.item.ItemStack)">writeItemStack</a></span>​(<a href="../../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a> itemStack)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr class="rowColor" id="i17">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeLong(long)">writeLong</a></span>​(long l)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single long to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i18">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeNBT(java.lang.String,org.jglrxavpok.hephaistos.nbt.NBT)">writeNBT</a></span>​(java.lang.String name,
|
|
org.jglrxavpok.hephaistos.nbt.NBT tag)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr class="rowColor" id="i19">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeShort(short)">writeShort</a></span>​(short s)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single short to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i20">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeShortSizedString(java.lang.String)">writeShortSizedString</a></span>​(java.lang.String string)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a string to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i21">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeSizedString(java.lang.String)">writeSizedString</a></span>​(java.lang.String string)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a string to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i22">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeStringArray(java.lang.String%5B%5D)">writeStringArray</a></span>​(java.lang.String[] array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a string to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i23">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeUuid(java.util.UUID)">writeUuid</a></span>​(java.util.UUID uuid)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes an <code>UUID</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i24">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeVarInt(int)">writeVarInt</a></span>​(int i)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single var-int to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i25">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeVarIntArray(int%5B%5D)">writeVarIntArray</a></span>​(int[] array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a var-int array to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i26">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeVarLong(long)">writeVarLong</a></span>​(long l)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a single var-long to the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="inheritedList">
|
|
<h3>Methods inherited from class java.io.OutputStream</h3>
|
|
<a id="methods.inherited.from.class.java.io.OutputStream">
|
|
<!-- -->
|
|
</a><code>close, flush, nullOutputStream, write, write</code></div>
|
|
<div class="inheritedList">
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<a id="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a><code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="details">
|
|
<ul class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<li class="blockList">
|
|
<section class="constructorDetails"><a id="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h2>Constructor Details</h2>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="<init>(int)">BinaryWriter</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="memberName">BinaryWriter</span>​(<span class="arguments">int initialCapacity)</span></div>
|
|
<div class="block">Creates a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> using a heap buffer with a custom initial capacity.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>initialCapacity</code> - the initial capacity of the binary writer</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="<init>(io.netty.buffer.ByteBuf...)">BinaryWriter</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="memberName">BinaryWriter</span>​(<span class="arguments">io.netty.buffer.ByteBuf... buffers)</span></div>
|
|
<div class="block">Creates a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> from multiple buffers.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>buffers</code> - the buffers making this</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="<init>()">BinaryWriter</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="memberName">BinaryWriter</span>()</div>
|
|
<div class="block">Creates a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> with a "reasonably small initial capacity".</div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<li class="blockList">
|
|
<section class="methodDetails"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h2>Method Details</h2>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeBoolean(boolean)">writeBoolean</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeBoolean</span>​(<span class="arguments">boolean b)</span></div>
|
|
<div class="block">Writes a single boolean to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>b</code> - the boolean to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeByte(byte)">writeByte</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeByte</span>​(<span class="arguments">byte b)</span></div>
|
|
<div class="block">Writes a single byte to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>b</code> - the byte to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeChar(char)">writeChar</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeChar</span>​(<span class="arguments">char c)</span></div>
|
|
<div class="block">Writes a single char to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>c</code> - the char to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeShort(short)">writeShort</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeShort</span>​(<span class="arguments">short s)</span></div>
|
|
<div class="block">Writes a single short to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>s</code> - the short to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeInt(int)">writeInt</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeInt</span>​(<span class="arguments">int i)</span></div>
|
|
<div class="block">Writes a single int to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>i</code> - the int to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeLong(long)">writeLong</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeLong</span>​(<span class="arguments">long l)</span></div>
|
|
<div class="block">Writes a single long to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>l</code> - the long to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeFloat(float)">writeFloat</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeFloat</span>​(<span class="arguments">float f)</span></div>
|
|
<div class="block">Writes a single float to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>f</code> - the float to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeDouble(double)">writeDouble</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeDouble</span>​(<span class="arguments">double d)</span></div>
|
|
<div class="block">Writes a single double to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>d</code> - the double to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeVarInt(int)">writeVarInt</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeVarInt</span>​(<span class="arguments">int i)</span></div>
|
|
<div class="block">Writes a single var-int to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>i</code> - the int to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeVarLong(long)">writeVarLong</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeVarLong</span>​(<span class="arguments">long l)</span></div>
|
|
<div class="block">Writes a single var-long to the buffer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>l</code> - the long to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeSizedString(java.lang.String)">writeSizedString</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeSizedString</span>​(<span class="arguments">java.lang.String string)</span></div>
|
|
<div class="block">Writes a string to the buffer.
|
|
<p>
|
|
The size is a var-int type.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>string</code> - the string to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeShortSizedString(java.lang.String)">writeShortSizedString</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeShortSizedString</span>​(<span class="arguments">java.lang.String string)</span></div>
|
|
<div class="block">Writes a string to the buffer.
|
|
<p>
|
|
The size is a short type.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>string</code> - the string to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeVarIntArray(int[])">writeVarIntArray</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeVarIntArray</span>​(<span class="arguments">int[] array)</span></div>
|
|
<div class="block">Writes a var-int array to the buffer.
|
|
<p>
|
|
It is sized by another var-int at the beginning.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - the integers to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeBytes(byte[])">writeBytes</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeBytes</span>​(<span class="arguments">byte[] bytes)</span></div>
|
|
<div class="block">Writes a byte array.
|
|
<p>
|
|
WARNING: it doesn't write the length of <code>bytes</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - the byte array to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeStringArray(java.lang.String[])">writeStringArray</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeStringArray</span>​(<span class="arguments">java.lang.String[] array)</span></div>
|
|
<div class="block">Writes a string to the buffer.
|
|
<p>
|
|
The array is sized by a var-int and all strings are wrote using <a href="#writeSizedString(java.lang.String)"><code>writeSizedString(String)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - the string array to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="write(java.util.function.Consumer)">write</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">write</span>​(<span class="arguments">java.util.function.Consumer<<a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary">BinaryWriter</a>> consumer)</span></div>
|
|
<div class="block">Consumer this object to write at a different time</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>consumer</code> - the writer consumer</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeUuid(java.util.UUID)">writeUuid</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeUuid</span>​(<span class="arguments">java.util.UUID uuid)</span></div>
|
|
<div class="block">Writes an <code>UUID</code>.
|
|
It is done by writing both long, the most and least significant bits.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>uuid</code> - the <code>UUID</code> to write</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeBlockPosition(net.minestom.server.utils.BlockPosition)">writeBlockPosition</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeBlockPosition</span>​(<span class="arguments"><a href="../BlockPosition.html" title="class in net.minestom.server.utils">BlockPosition</a> blockPosition)</span></div>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeBlockPosition(int,int,int)">writeBlockPosition</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeBlockPosition</span>​(<span class="arguments">int x,
|
|
int y,
|
|
int z)</span></div>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeItemStack(net.minestom.server.item.ItemStack)">writeItemStack</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeItemStack</span>​(<span class="arguments"><a href="../../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a> itemStack)</span></div>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeNBT(java.lang.String,org.jglrxavpok.hephaistos.nbt.NBT)">writeNBT</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeNBT</span>​(<span class="arguments">java.lang.String name,
|
|
org.jglrxavpok.hephaistos.nbt.NBT tag)</span></div>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="toByteArray()">toByteArray</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">byte[]</span> <span class="memberName">toByteArray</span>()</div>
|
|
<div class="block">Converts the internal buffer to a byte array.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the byte array containing all the <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> data</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeAtStart(net.minestom.server.utils.binary.BinaryWriter)">writeAtStart</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeAtStart</span>​(<span class="arguments"><a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary">BinaryWriter</a> headerWriter)</span></div>
|
|
<div class="block">Adds a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a>'s <code>ByteBuf</code> at the beginning of this writer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>headerWriter</code> - the <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> to add at the beginning</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="writeAtEnd(net.minestom.server.utils.binary.BinaryWriter)">writeAtEnd</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">writeAtEnd</span>​(<span class="arguments"><a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary">BinaryWriter</a> footerWriter)</span></div>
|
|
<div class="block">Adds a <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a>'s <code>ByteBuf</code> at the end of this writer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>footerWriter</code> - the <a href="BinaryWriter.html" title="class in net.minestom.server.utils.binary"><code>BinaryWriter</code></a> to add at the end</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="getBuffer()">getBuffer</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">io.netty.buffer.ByteBuf</span> <span class="memberName">getBuffer</span>()</div>
|
|
<div class="block">Gets the raw buffer used by this binary writer.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the raw buffer</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="setBuffer(io.netty.buffer.ByteBuf)">setBuffer</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">setBuffer</span>​(<span class="arguments">io.netty.buffer.ByteBuf buffer)</span></div>
|
|
<div class="block">Changes the buffer used by this binary writer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>buffer</code> - the new buffer used by this binary writer</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li class="blockList">
|
|
<section class="detail">
|
|
<h3><a id="write(int)">write</a></h3>
|
|
<div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">void</span> <span class="memberName">write</span>​(<span class="arguments">int b)</span></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>write</code> in class <code>java.io.OutputStream</code></dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
</main>
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|