本文整理了Java中org.fusesource.hawtbuf.Buffer.indexOf()
方法的一些代码示例,展示了Buffer.indexOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.indexOf()
方法的具体详情如下:
包路径:org.fusesource.hawtbuf.Buffer
类名称:Buffer
方法名:indexOf
暂无
代码示例来源:origin: org.fusesource.hawtbuf/hawtbuf
final public int indexOf(Buffer needle) {
return indexOf(needle, 0);
}
代码示例来源:origin: org.fusesource.hawtbuf/hawtbuf
final public boolean contains(byte value) {
return indexOf(value, 0) >= 0;
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
final public boolean contains(byte value) {
return indexOf(value, 0) >= 0;
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
final public int indexOf(byte value) {
return indexOf(value, 0);
}
代码示例来源:origin: org.apache.activemq/activemq-all
final public boolean startsWith(Buffer other) {
return indexOf(other, 0)==0;
}
代码示例来源:origin: org.apache.activemq/activemq-all
final public int indexOf(Buffer needle) {
return indexOf(needle, 0);
}
代码示例来源:origin: org.fusesource.hawtbuf/hawtbuf
final public int indexOf(byte value) {
return indexOf(value, 0);
}
代码示例来源:origin: org.fusesource.hawtbuf/hawtbuf
final public boolean startsWith(Buffer other) {
return indexOf(other, 0)==0;
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
final public boolean startsWith(Buffer other) {
return indexOf(other, 0)==0;
}
代码示例来源:origin: org.apache.activemq/activemq-all
final public boolean contains(byte value) {
return indexOf(value, 0) >= 0;
}
代码示例来源:origin: org.apache.activemq/activemq-all
final public int indexOf(byte value) {
return indexOf(value, 0);
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
final public int indexOf(Buffer needle) {
return indexOf(needle, 0);
}
代码示例来源:origin: org.apache.activemq/apollo-mqtt
@Override
public boolean matchesIdentification(Buffer header) {
if (header.length < 10) {
return false;
} else {
return header.startsWith(HEAD_MAGIC) && (
header.indexOf(MQTT31_TAIL_MAGIC, 2) < 6 ||
header.indexOf(MQTT311_TAIL_MAGIC, 2) < 6
);
}
}
代码示例来源:origin: org.fusesource.hawtdispatch/hawtdispatch-transport
protected Buffer readUntil(Byte octet, int max, String msg) throws ProtocolException {
byte[] array = readBuffer.array();
Buffer buf = new Buffer(array, readEnd, readBuffer.position() - readEnd);
int pos = buf.indexOf(octet);
if (pos >= 0) {
int offset = readStart;
readEnd += pos + 1;
readStart = readEnd;
int length = readEnd - offset;
if (max >= 0 && length > max) {
throw new ProtocolException(msg);
}
return new Buffer(array, offset, length);
} else {
readEnd += buf.length;
if (max >= 0 && (readEnd - readStart) > max) {
throw new ProtocolException(msg);
}
return null;
}
}
代码示例来源:origin: org.fusesource.stompjms/stompjms-client
int seperatorIndex = line.indexOf(COLON_BYTE);
if (seperatorIndex < 0) {
throw new IOException("Header line missing seperator [" + line.ascii() + "]");
代码示例来源:origin: fusesource/stompjms
int seperatorIndex = line.indexOf(COLON_BYTE);
if (seperatorIndex < 0) {
throw new IOException("Header line missing seperator [" + line.ascii() + "]");
内容来源于网络,如有侵权,请联系作者删除!