本文整理了Java中org.glassfish.grizzly.Buffer.putChar()
方法的一些代码示例,展示了Buffer.putChar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.putChar()
方法的具体详情如下:
包路径:org.glassfish.grizzly.Buffer
类名称:Buffer
方法名:putChar
[英]Relative put method for writing a char value (optional operation).
Writes two bytes containing the given char value, in the current byte order, into this buffer at the current position, and then increments the position by two.
[中]用于写入字符值的相对put方法(可选操作)。
将包含给定字符值的两个字节按当前字节顺序写入当前位置的该缓冲区,然后将该位置增加两个字节。
代码示例来源:origin: org.glassfish.shoal/shoal-gms-impl
@Override
public Buffer putChar(final int index, final char value) {
grizzlyBuffer.putChar(index, value);
return this;
}
代码示例来源:origin: org.shoal/shoal-gms-impl
@Override
public Buffer putChar(final int index, final char value) {
grizzlyBuffer.putChar(index, value);
return this;
}
代码示例来源:origin: org.shoal/shoal-gms-impl
@Override
public Buffer putChar(final char value) {
grizzlyBuffer.putChar(value);
return this;
}
代码示例来源:origin: org.glassfish.shoal/shoal-gms-impl
@Override
public Buffer putChar(final char value) {
grizzlyBuffer.putChar(value);
return this;
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-core
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-framework
/**
* {@inheritDoc}
*/
@Override
public void writeChar(final char data) throws IOException {
if (isOutputBuffered) {
output.ensureBufferCapacity(2);
output.getBuffer().putChar(data);
} else {
output.write((byte) ((data >>> 8) & 0xFF));
output.write((byte) ((data) & 0xFF));
}
}
代码示例来源:origin: javaee/grizzly
@Override
public BuffersBuffer putChar(int index, final char value) {
checkDispose();
checkReadOnly();
checkIndex(index);
if (upperBound - index >= 2) {
activeBuffer.putChar(toActiveBufferPos(index), value);
} else {
if (bigEndian) {
putCharB(index, value);
} else {
putCharL(index, value);
}
}
return this;
}
代码示例来源:origin: javaee/grizzly
@Override
public BuffersBuffer putChar(int index, final char value) {
checkDispose();
checkReadOnly();
checkIndex(index);
if (upperBound - index >= 2) {
activeBuffer.putChar(toActiveBufferPos(index), value);
} else {
if (bigEndian) {
putCharB(index, value);
} else {
putCharL(index, value);
}
}
return this;
}
代码示例来源:origin: javaee/grizzly
@Override
public BuffersBuffer putChar(int index, final char value) {
checkDispose();
checkReadOnly();
checkIndex(index);
if (upperBound - index >= 2) {
activeBuffer.putChar(toActiveBufferPos(index), value);
} else {
if (bigEndian) {
putCharB(index, value);
} else {
putCharL(index, value);
}
}
return this;
}
代码示例来源:origin: javaee/grizzly
@Override
public BuffersBuffer putChar(int index, final char value) {
checkDispose();
checkReadOnly();
checkIndex(index);
if (upperBound - index >= 2) {
activeBuffer.putChar(toActiveBufferPos(index), value);
} else {
if (bigEndian) {
putCharB(index, value);
} else {
putCharL(index, value);
}
}
return this;
}
内容来源于网络,如有侵权,请联系作者删除!