当前位置: 首页>>代码示例>>Java>>正文


Java PipeReader.readUTF8方法代码示例

本文整理汇总了Java中com.ociweb.pronghorn.pipe.PipeReader.readUTF8方法的典型用法代码示例。如果您正苦于以下问题:Java PipeReader.readUTF8方法的具体用法?Java PipeReader.readUTF8怎么用?Java PipeReader.readUTF8使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ociweb.pronghorn.pipe.PipeReader的用法示例。


在下文中一共展示了PipeReader.readUTF8方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toString

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public String toString() {
	
	StringBuilder builder = new StringBuilder();
	
	builder.append("topic: ");
	PipeReader.readUTF8(pipe, topic, builder);
	builder.append(" payload: ");
	
	DataInputBlobReader<?> stream = PipeReader.inputStream(pipe, payload);
	
	while (stream.hasRemainingBytes()) {
		
		Appendables.appendFixedHexDigits(builder, (0xFF&stream.readByte()), 8);
		if (stream.hasRemainingBytes()) {
			builder.append(',');
		}
	}
	
	return builder.toString();
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:21,代码来源:MessagePubSubTrace.java

示例2: consumeUserPost

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeUserPost(Pipe<TwitterEventSchema> input) {
    int fieldFlags = PipeReader.readInt(input,MSG_USERPOST_101_FIELD_FLAGS_31);
    long fieldUserId = PipeReader.readLong(input,MSG_USERPOST_101_FIELD_USERID_51);
    StringBuilder fieldName = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_NAME_52,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_NAME_52)));
    StringBuilder fieldScreenName = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_SCREENNAME_53,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_SCREENNAME_53)));
    int fieldFavouritesCount = PipeReader.readInt(input,MSG_USERPOST_101_FIELD_FAVOURITESCOUNT_54);
    int fieldFollowersCount = PipeReader.readInt(input,MSG_USERPOST_101_FIELD_FOLLOWERSCOUNT_55);
    int fieldFriendsCount = PipeReader.readInt(input,MSG_USERPOST_101_FIELD_FRIENDSCOUNT_56);
    StringBuilder fieldCreatedAt = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_CREATEDAT_57,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_CREATEDAT_57)));
    StringBuilder fieldDescription = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_DESCRIPTION_58,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_DESCRIPTION_58)));
    int fieldListedCount = PipeReader.readInt(input,MSG_USERPOST_101_FIELD_LISTEDCOUNT_59);
    StringBuilder fieldLanguage = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_LANGUAGE_60,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_LANGUAGE_60)));
    StringBuilder fieldTimeZone = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_TIMEZONE_61,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_TIMEZONE_61)));
    StringBuilder fieldLocation = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_LOCATION_62,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_LOCATION_62)));
    long fieldPostId = PipeReader.readLong(input,MSG_USERPOST_101_FIELD_POSTID_21);
    StringBuilder fieldText = PipeReader.readUTF8(input,MSG_USERPOST_101_FIELD_TEXT_22,new StringBuilder(PipeReader.readBytesLength(input,MSG_USERPOST_101_FIELD_TEXT_22)));
    long fieldInReplyTo = PipeReader.readLong(input,MSG_USERPOST_101_FIELD_INREPLYTO_23);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:19,代码来源:TwitterEventSchema.java

示例3: run

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
@Override
public void run() {
	
	while (PipeReader.tryReadFragment(input)) {
		try {
			target.append("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n");

			long id = PipeReader.readLong(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_USERID_51);
			Appendables.appendValue(target, "id:",id);
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_NAME_52, target);
			target.append('\n');
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_SCREENNAME_53, target);
			target.append('\n');			
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_CREATEDAT_57, target);
			target.append('\n');
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_DESCRIPTION_58, target);
			target.append('\n');
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_LANGUAGE_60, target);
			target.append('\n');
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_TIMEZONE_61, target);
			target.append('\n');
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_LOCATION_62, target);
			target.append('\n');
			
			PipeReader.readUTF8(input, TwitterEventSchema.MSG_USERPOST_101_FIELD_TEXT_22, target);
			target.append('\n');
			
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		PipeReader.releaseReadLock(input);
	}
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:41,代码来源:TwitterEventDumpStage.java

示例4: consumeConnect

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeConnect(Pipe<MQTTClientRequestSchema> input) {
    int fieldKeepAliveSec = PipeReader.readInt(input,MSG_CONNECT_1_FIELD_KEEPALIVESEC_28);
    int fieldFlags = PipeReader.readInt(input,MSG_CONNECT_1_FIELD_FLAGS_29);
    StringBuilder fieldClientId = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_CLIENTID_30,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_CLIENTID_30)));
    StringBuilder fieldWillTopic = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_WILLTOPIC_31,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_WILLTOPIC_31)));
    ByteBuffer fieldWillPayload = PipeReader.readBytes(input,MSG_CONNECT_1_FIELD_WILLPAYLOAD_32,ByteBuffer.allocate(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_WILLPAYLOAD_32)));
    StringBuilder fieldUser = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_USER_33,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_USER_33)));
    StringBuilder fieldPass = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_PASS_34,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_PASS_34)));
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:10,代码来源:MQTTClientRequestSchema.java

示例5: consumePublish

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
private void consumePublish(Pipe<MQTTServerToClientSchema> input) {
	long fieldTime = PipeReader.readLong(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_TIME_37);
	int fieldPacketId = PipeReader.readInt(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_PACKETID_20);
	int fieldQOS = PipeReader.readInt(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_QOS_21);
	int fieldRetain = PipeReader.readInt(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_RETAIN_22);
	int fieldDup = PipeReader.readInt(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_DUP_36);
	StringBuilder fieldTopic = PipeReader.readUTF8(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_TOPIC_23,new StringBuilder(PipeReader.readBytesLength(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_TOPIC_23)));
	ByteBuffer fieldPayload = PipeReader.readBytes(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_PAYLOAD_25,ByteBuffer.allocate(PipeReader.readBytesLength(input,MQTTServerToClientSchema.MSG_PUBLISH_3_FIELD_PAYLOAD_25)));
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:10,代码来源:MQTTServerToClientEncodeStage.java

示例6: consumeConnect

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeConnect(Pipe<MQTTClientToServerSchema> input) {
    long fieldTime = PipeReader.readLong(input,MSG_CONNECT_1_FIELD_TIME_37);
    int fieldKeepAliveSec = PipeReader.readInt(input,MSG_CONNECT_1_FIELD_KEEPALIVESEC_28);
    int fieldFlags = PipeReader.readInt(input,MSG_CONNECT_1_FIELD_FLAGS_29);
    StringBuilder fieldClientId = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_CLIENTID_30,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_CLIENTID_30)));
    StringBuilder fieldWillTopic = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_WILLTOPIC_31,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_WILLTOPIC_31)));
    DataInputBlobReader<MQTTClientToServerSchema> fieldWillPayload = PipeReader.inputStream(input, MSG_CONNECT_1_FIELD_WILLPAYLOAD_32);
    StringBuilder fieldUser = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_USER_33,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_USER_33)));
    StringBuilder fieldPass = PipeReader.readUTF8(input,MSG_CONNECT_1_FIELD_PASS_34,new StringBuilder(PipeReader.readBytesLength(input,MSG_CONNECT_1_FIELD_PASS_34)));
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:11,代码来源:MQTTClientToServerSchema.java

示例7: consumePublish

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumePublish(Pipe<MQTTClientToServerSchema> input) {
    long fieldTime = PipeReader.readLong(input,MSG_PUBLISH_3_FIELD_TIME_37);
    int fieldPacketId = PipeReader.readInt(input,MSG_PUBLISH_3_FIELD_PACKETID_20);
    int fieldQOS = PipeReader.readInt(input,MSG_PUBLISH_3_FIELD_QOS_21);
    int fieldRetain = PipeReader.readInt(input,MSG_PUBLISH_3_FIELD_RETAIN_22);
    StringBuilder fieldTopic = PipeReader.readUTF8(input,MSG_PUBLISH_3_FIELD_TOPIC_23,new StringBuilder(PipeReader.readBytesLength(input,MSG_PUBLISH_3_FIELD_TOPIC_23)));
    DataInputBlobReader<MQTTClientToServerSchema> fieldPayload = PipeReader.inputStream(input, MSG_PUBLISH_3_FIELD_PAYLOAD_25);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:9,代码来源:MQTTClientToServerSchema.java

示例8: consumePublish

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumePublish(Pipe<MQTTServerToClientSchema> input) {
    long fieldTime = PipeReader.readLong(input,MSG_PUBLISH_3_FIELD_TIME_37);
    int fieldQOS = PipeReader.readInt(input,MSG_PUBLISH_3_FIELD_QOS_21);
    int fieldRetain = PipeReader.readInt(input,MSG_PUBLISH_3_FIELD_RETAIN_22);
    int fieldDup = PipeReader.readInt(input,MSG_PUBLISH_3_FIELD_DUP_36);
    StringBuilder fieldTopic = PipeReader.readUTF8(input,MSG_PUBLISH_3_FIELD_TOPIC_23,new StringBuilder(PipeReader.readBytesLength(input,MSG_PUBLISH_3_FIELD_TOPIC_23)));
    int fieldPacketId = PipeReader.readInt(input,MSG_PUBLISH_3_FIELD_PACKETID_20);
    DataInputBlobReader<MQTTServerToClientSchema> fieldPayload = PipeReader.inputStream(input, MSG_PUBLISH_3_FIELD_PAYLOAD_25);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:10,代码来源:MQTTServerToClientSchema.java

示例9: consumeHTTPGet

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeHTTPGet(Pipe<ClientHTTPRequestSchema> input) {
    int fieldDestination = PipeReader.readInt(input,MSG_HTTPGET_100_FIELD_DESTINATION_11);
    int fieldSession = PipeReader.readInt(input,MSG_HTTPGET_100_FIELD_SESSION_10);
    int fieldPort = PipeReader.readInt(input,MSG_HTTPGET_100_FIELD_PORT_1);
    StringBuilder fieldHost = PipeReader.readUTF8(input,MSG_HTTPGET_100_FIELD_HOST_2,new StringBuilder(PipeReader.readBytesLength(input,MSG_HTTPGET_100_FIELD_HOST_2)));
    StringBuilder fieldPath = PipeReader.readUTF8(input,MSG_HTTPGET_100_FIELD_PATH_3,new StringBuilder(PipeReader.readBytesLength(input,MSG_HTTPGET_100_FIELD_PATH_3)));
    StringBuilder fieldHeaders = PipeReader.readUTF8(input,MSG_HTTPGET_100_FIELD_HEADERS_7,new StringBuilder(PipeReader.readBytesLength(input,MSG_HTTPGET_100_FIELD_HEADERS_7)));
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:9,代码来源:ClientHTTPRequestSchema.java

示例10: consumeFastHTTPGet

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeFastHTTPGet(Pipe<ClientHTTPRequestSchema> input) {
    int fieldDestination = PipeReader.readInt(input,MSG_FASTHTTPGET_200_FIELD_DESTINATION_11);
    int fieldSession = PipeReader.readInt(input,MSG_FASTHTTPGET_200_FIELD_SESSION_10);
    int fieldPort = PipeReader.readInt(input,MSG_FASTHTTPGET_200_FIELD_PORT_1);
    StringBuilder fieldHost = PipeReader.readUTF8(input,MSG_FASTHTTPGET_200_FIELD_HOST_2,new StringBuilder(PipeReader.readBytesLength(input,MSG_FASTHTTPGET_200_FIELD_HOST_2)));
    long fieldConnectionId = PipeReader.readLong(input,MSG_FASTHTTPGET_200_FIELD_CONNECTIONID_20);
    StringBuilder fieldPath = PipeReader.readUTF8(input,MSG_FASTHTTPGET_200_FIELD_PATH_3,new StringBuilder(PipeReader.readBytesLength(input,MSG_FASTHTTPGET_200_FIELD_PATH_3)));
    StringBuilder fieldHeaders = PipeReader.readUTF8(input,MSG_FASTHTTPGET_200_FIELD_HEADERS_7,new StringBuilder(PipeReader.readBytesLength(input,MSG_FASTHTTPGET_200_FIELD_HEADERS_7)));
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:10,代码来源:ClientHTTPRequestSchema.java

示例11: consumeFastHTTPPost

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeFastHTTPPost(Pipe<ClientHTTPRequestSchema> input) {
    int fieldDestination = PipeReader.readInt(input,MSG_FASTHTTPPOST_201_FIELD_DESTINATION_11);
    int fieldSession = PipeReader.readInt(input,MSG_FASTHTTPPOST_201_FIELD_SESSION_10);
    int fieldPort = PipeReader.readInt(input,MSG_FASTHTTPPOST_201_FIELD_PORT_1);
    StringBuilder fieldHost = PipeReader.readUTF8(input,MSG_FASTHTTPPOST_201_FIELD_HOST_2,new StringBuilder(PipeReader.readBytesLength(input,MSG_FASTHTTPPOST_201_FIELD_HOST_2)));
    long fieldConnectionId = PipeReader.readLong(input,MSG_FASTHTTPPOST_201_FIELD_CONNECTIONID_20);
    StringBuilder fieldPath = PipeReader.readUTF8(input,MSG_FASTHTTPPOST_201_FIELD_PATH_3,new StringBuilder(PipeReader.readBytesLength(input,MSG_FASTHTTPPOST_201_FIELD_PATH_3)));
    StringBuilder fieldHeaders = PipeReader.readUTF8(input,MSG_FASTHTTPPOST_201_FIELD_HEADERS_7,new StringBuilder(PipeReader.readBytesLength(input,MSG_FASTHTTPPOST_201_FIELD_HEADERS_7)));
    DataInputBlobReader<ClientHTTPRequestSchema> fieldPayload = PipeReader.inputStream(input, MSG_FASTHTTPPOST_201_FIELD_PAYLOAD_5);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:11,代码来源:ClientHTTPRequestSchema.java

示例12: consumeHTTPPostChunked

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeHTTPPostChunked(Pipe<ClientHTTPRequestSchema> input) {
    int fieldDestination = PipeReader.readInt(input,MSG_HTTPPOSTCHUNKED_102_FIELD_DESTINATION_11);
    int fieldSession = PipeReader.readInt(input,MSG_HTTPPOSTCHUNKED_102_FIELD_SESSION_10);
    int fieldPort = PipeReader.readInt(input,MSG_HTTPPOSTCHUNKED_102_FIELD_PORT_1);
    StringBuilder fieldHost = PipeReader.readUTF8(input,MSG_HTTPPOSTCHUNKED_102_FIELD_HOST_2,new StringBuilder(PipeReader.readBytesLength(input,MSG_HTTPPOSTCHUNKED_102_FIELD_HOST_2)));
    StringBuilder fieldPath = PipeReader.readUTF8(input,MSG_HTTPPOSTCHUNKED_102_FIELD_PATH_3,new StringBuilder(PipeReader.readBytesLength(input,MSG_HTTPPOSTCHUNKED_102_FIELD_PATH_3)));
    long fieldTotalLength = PipeReader.readLong(input,MSG_HTTPPOSTCHUNKED_102_FIELD_TOTALLENGTH_6);
    DataInputBlobReader<ClientHTTPRequestSchema> fieldPayloadChunk = PipeReader.inputStream(input, MSG_HTTPPOSTCHUNKED_102_FIELD_PAYLOADCHUNK_5);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:10,代码来源:ClientHTTPRequestSchema.java

示例13: consumeSubscribe

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeSubscribe(Pipe<MessagePubSub> input) {
    StringBuilder fieldTopic = PipeReader.readUTF8(input,MSG_SUBSCRIBE_100_FIELD_TOPIC_1,new StringBuilder(PipeReader.readBytesLength(input,MSG_SUBSCRIBE_100_FIELD_TOPIC_1)));
    int fieldSubscriberIdentityHash = PipeReader.readInt(input,MSG_SUBSCRIBE_100_FIELD_SUBSCRIBERIDENTITYHASH_4);
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:5,代码来源:MessagePubSub.java

示例14: consumeUnsubscribe

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumeUnsubscribe(Pipe<MessagePubSub> input) {
    StringBuilder fieldTopic = PipeReader.readUTF8(input,MSG_UNSUBSCRIBE_101_FIELD_TOPIC_1,new StringBuilder(PipeReader.readBytesLength(input,MSG_UNSUBSCRIBE_101_FIELD_TOPIC_1)));
    int fieldSubscriberIdentityHash = PipeReader.readInt(input,MSG_UNSUBSCRIBE_101_FIELD_SUBSCRIBERIDENTITYHASH_4);
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:5,代码来源:MessagePubSub.java

示例15: consumePublish

import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consumePublish(Pipe<MessagePubSub> input) {
    int fieldQOS = PipeReader.readInt(input,MSG_PUBLISH_103_FIELD_QOS_5);
    StringBuilder fieldTopic = PipeReader.readUTF8(input,MSG_PUBLISH_103_FIELD_TOPIC_1,new StringBuilder(PipeReader.readBytesLength(input,MSG_PUBLISH_103_FIELD_TOPIC_1)));
    DataInputBlobReader<MessagePubSub> fieldPayload = PipeReader.inputStream(input, MSG_PUBLISH_103_FIELD_PAYLOAD_3);
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:6,代码来源:MessagePubSub.java


注:本文中的com.ociweb.pronghorn.pipe.PipeReader.readUTF8方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。