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


Java Convert.readString方法代码示例

本文整理汇总了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;
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:17,代码来源:Attachment.java

示例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);
    }
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:13,代码来源:Attachment.java

示例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();
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:8,代码来源:Attachment.java

示例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();
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:9,代码来源:Attachment.java

示例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;
	
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:13,代码来源:Attachment.java

示例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();
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:6,代码来源:Attachment.java

示例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);
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:5,代码来源:Attachment.java

示例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);
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:6,代码来源:Attachment.java

示例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;
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:7,代码来源:Attachment.java


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