本文整理了Java中org.fusesource.hawtbuf.Buffer.get()
方法的一些代码示例,展示了Buffer.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.get()
方法的具体详情如下:
包路径:org.fusesource.hawtbuf.Buffer
类名称:Buffer
方法名:get
暂无
代码示例来源:origin: org.fusesource.stompjms/stompjms-client
static boolean isCompressed(Buffer data) {
boolean result = false;
if (data != null && data.length > 2) {
int ch1 = (int) (data.get(0) & 0xff);
int ch2 = (int) (data.get(1) & 0xff);
int magic = (ch1 | (ch2 << 8));
result = (magic == GZIPInputStream.GZIP_MAGIC);
}
return result;
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
static public String decode(Buffer value)
{
int size = value.getLength();
char rc[] = new char[size];
for( int i=0; i < size; i++ ) {
rc[i] = (char)(value.get(i) & 0xFF );
}
return new String(rc);
}
代码示例来源:origin: org.fusesource.hawtbuf/hawtbuf
static public String decode(Buffer value)
{
int size = value.getLength();
char rc[] = new char[size];
for( int i=0; i < size; i++ ) {
rc[i] = (char)(value.get(i) & 0xFF );
}
return new String(rc);
}
代码示例来源:origin: fusesource/stompjms
static boolean isCompressed(Buffer data) {
boolean result = false;
if (data != null && data.length > 2) {
int ch1 = (int) (data.get(0) & 0xff);
int ch2 = (int) (data.get(1) & 0xff);
int magic = (ch1 | (ch2 << 8));
result = (magic == GZIPInputStream.GZIP_MAGIC);
}
return result;
}
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
static public String decode(Buffer value)
{
int size = value.getLength();
char rc[] = new char[size];
for( int i=0; i < size; i++ ) {
rc[i] = (char)(value.get(i) & 0xFF );
}
return new String(rc);
}
代码示例来源:origin: org.apache.qpid/proton-hawtdispatch
public int getMajor() {
return buffer.get(5) & 0xFF;
}
public void setMajor(int value) {
代码示例来源:origin: org.apache.qpid/proton-hawtdispatch
public int getMinor() {
return buffer.get(6) & 0xFF;
}
public void setMinor(int value) {
代码示例来源:origin: org.apache.qpid/proton-hawtdispatch
public int getRevision() {
return buffer.get(7) & 0xFF;
}
public void setRevision(int value) {
代码示例来源:origin: org.apache.activemq/activemq-all
public int getMajor() {
return buffer.get(5) & 0xFF;
}
代码示例来源:origin: org.apache.activemq/activemq-all
public int getMinor() {
return buffer.get(6) & 0xFF;
}
代码示例来源:origin: org.apache.activemq/activemq-all
public int getRevision() {
return buffer.get(7) & 0xFF;
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
public int getMajor() {
return buffer.get(5) & 0xFF;
}
代码示例来源:origin: org.apache.qpid/proton-hawtdispatch
public int getProtocolId() {
return buffer.get(4) & 0xFF;
}
public void setProtocolId(int value) {
代码示例来源:origin: org.apache.activemq/activemq-osgi
public int getProtocolId() {
return buffer.get(4) & 0xFF;
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
public int getMinor() {
return buffer.get(6) & 0xFF;
}
代码示例来源:origin: apache/activemq-artemis
public int getProtocolId() {
return buffer.get(4) & 0xFF;
}
代码示例来源:origin: apache/activemq-artemis
public int getMinor() {
return buffer.get(6) & 0xFF;
}
代码示例来源:origin: apache/activemq-artemis
public int getRevision() {
return buffer.get(7) & 0xFF;
}
代码示例来源:origin: apache/activemq-artemis
public int getMajor() {
return buffer.get(5) & 0xFF;
}
代码示例来源:origin: apache/activemq-artemis
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < buffer.length(); ++i) {
char value = (char) buffer.get(i);
if (Character.isLetter(value)) {
builder.append(value);
} else {
builder.append(",");
builder.append((int) value);
}
}
return builder.toString();
}
}
内容来源于网络,如有侵权,请联系作者删除!