本文整理汇总了Java中nxt.util.Convert.readString方法的典型用法代码示例。如果您正苦于以下问题:Java Convert.readString方法的具体用法?Java Convert.readString怎么用?Java Convert.readString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nxt.util.Convert
的用法示例。
在下文中一共展示了Convert.readString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MessagingPollCreation
import nxt.util.Convert; //导入方法依赖的package包/类
MessagingPollCreation(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.pollName = Convert.readString(buffer, buffer.getShort(), Constants.MAX_POLL_NAME_LENGTH);
this.pollDescription = Convert.readString(buffer, buffer.getShort(), Constants.MAX_POLL_DESCRIPTION_LENGTH);
int numberOfOptions = buffer.get();
if (numberOfOptions > Constants.MAX_POLL_OPTION_COUNT) {
throw new NxtException.NotValidException("Invalid number of poll options: " + numberOfOptions);
}
this.pollOptions = new String[numberOfOptions];
for (int i = 0; i < numberOfOptions; i++) {
pollOptions[i] = Convert.readString(buffer, buffer.getShort(), Constants.MAX_POLL_OPTION_LENGTH);
}
this.minNumberOfOptions = buffer.get();
this.maxNumberOfOptions = buffer.get();
this.optionsAreBinary = buffer.get() != 0;
}
示例2: MessagingHubAnnouncement
import nxt.util.Convert; //导入方法依赖的package包/类
MessagingHubAnnouncement(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.minFeePerByteNQT = buffer.getLong();
int numberOfUris = buffer.get();
if (numberOfUris > Constants.MAX_HUB_ANNOUNCEMENT_URIS) {
throw new NxtException.NotValidException("Invalid number of URIs: " + numberOfUris);
}
this.uris = new String[numberOfUris];
for (int i = 0; i < uris.length; i++) {
uris[i] = Convert.readString(buffer, buffer.getShort(), Constants.MAX_HUB_ANNOUNCEMENT_URI_LENGTH);
}
}
示例3: ColoredCoinsAssetIssuance
import nxt.util.Convert; //导入方法依赖的package包/类
ColoredCoinsAssetIssuance(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.name = Convert.readString(buffer, buffer.get(), Constants.MAX_ASSET_NAME_LENGTH);
this.description = Convert.readString(buffer, buffer.getShort(), Constants.MAX_ASSET_DESCRIPTION_LENGTH);
this.quantityQNT = buffer.getLong();
this.decimals = buffer.get();
}
示例4: DigitalGoodsListing
import nxt.util.Convert; //导入方法依赖的package包/类
DigitalGoodsListing(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.name = Convert.readString(buffer, buffer.getShort(), Constants.MAX_DGS_LISTING_NAME_LENGTH);
this.description = Convert.readString(buffer, buffer.getShort(), Constants.MAX_DGS_LISTING_DESCRIPTION_LENGTH);
this.tags = Convert.readString(buffer, buffer.getShort(), Constants.MAX_DGS_LISTING_TAGS_LENGTH);
this.quantity = buffer.getInt();
this.priceNQT = buffer.getLong();
}
示例5: AutomatedTransactionsCreation
import nxt.util.Convert; //导入方法依赖的package包/类
AutomatedTransactionsCreation(ByteBuffer buffer,
byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.name = Convert.readString( buffer , buffer.get() , Constants.MAX_AUTOMATED_TRANSACTION_NAME_LENGTH );
this.description = Convert.readString( buffer , buffer.getShort() , Constants.MAX_AUTOMATED_TRANSACTION_DESCRIPTION_LENGTH );
byte[] dst = new byte[ buffer.capacity() - buffer.position() ];
buffer.get( dst , 0 , buffer.capacity() - buffer.position() );
this.creationBytes = dst;
}
示例6: MessagingAliasSell
import nxt.util.Convert; //导入方法依赖的package包/类
MessagingAliasSell(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.aliasName = Convert.readString(buffer, buffer.get(), Constants.MAX_ALIAS_LENGTH);
this.priceNQT = buffer.getLong();
}
示例7: MessagingAliasBuy
import nxt.util.Convert; //导入方法依赖的package包/类
MessagingAliasBuy(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.aliasName = Convert.readString(buffer, buffer.get(), Constants.MAX_ALIAS_LENGTH);
}
示例8: MessagingAccountInfo
import nxt.util.Convert; //导入方法依赖的package包/类
MessagingAccountInfo(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.name = Convert.readString(buffer, buffer.get(), Constants.MAX_ACCOUNT_NAME_LENGTH);
this.description = Convert.readString(buffer, buffer.getShort(), Constants.MAX_ACCOUNT_DESCRIPTION_LENGTH);
}
示例9: ColoredCoinsAssetTransfer
import nxt.util.Convert; //导入方法依赖的package包/类
ColoredCoinsAssetTransfer(ByteBuffer buffer, byte transactionVersion) throws NxtException.NotValidException {
super(buffer, transactionVersion);
this.assetId = buffer.getLong();
this.quantityQNT = buffer.getLong();
this.comment = getVersion() == 0 ? Convert.readString(buffer, buffer.getShort(), Constants.MAX_ASSET_TRANSFER_COMMENT_LENGTH) : null;
}