Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class FileAppendTransactionBody.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<FileAppendTransactionBody,FileAppendTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<FileAppendTransactionBody,FileAppendTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.FileAppendTransactionBody.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,FileAppendTransactionBodyOrBuilder,Cloneable
- Enclosing class:
FileAppendTransactionBody
public static final class FileAppendTransactionBody.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<FileAppendTransactionBody,FileAppendTransactionBody.Builder>
implements FileAppendTransactionBodyOrBuilder
* A transaction body for an `appendContent` transaction.<br/> This transaction body provides a mechanism to append content to a "file" in network state. Hedera transactions are limited in size, but there are many uses for in-state byte arrays (e.g. smart contract bytecode) which require more than may fit within a single transaction. The `appendFile` transaction exists to support these requirements. The typical pattern is to create a file, append more data until the full content is stored, verify the file is correct, then update the file entry with any final metadata changes (e.g. adding threshold keys and removing the initial upload key). Each append transaction MUST remain within the total transaction size limit for the network (typically 6144 bytes).<br/> The total size of a file MUST remain within the maximum file size limit for the network (typically 1048576 bytes). #### Signature Requirements Append transactions MUST have signatures from _all_ keys in the `KeyList` assigned to the `keys` field of the file.<br/> See the [File Service](#FileService) specification for a detailed explanation of the signature requirements for all file transactions. ### Block Stream Effects NoneProtobuf type
proto.FileAppendTransactionBody-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* An array of bytes to append.<br/> <p> This content SHALL be appended to the identified file if this transaction succeeds.<br/> This field is REQUIRED.<br/> This field MUST NOT be empty.* A file identifier.<br/> This identifies the file to which the `contents` will be appended.com.google.protobuf.ByteString* An array of bytes to append.<br/> <p> This content SHALL be appended to the identified file if this transaction succeeds.<br/> This field is REQUIRED.<br/> This field MUST NOT be empty.* A file identifier.<br/> This identifies the file to which the `contents` will be appended.boolean* A file identifier.<br/> This identifies the file to which the `contents` will be appended.mergeFileID(FileID value) * A file identifier.<br/> This identifies the file to which the `contents` will be appended.setContents(com.google.protobuf.ByteString value) * An array of bytes to append.<br/> <p> This content SHALL be appended to the identified file if this transaction succeeds.<br/> This field is REQUIRED.<br/> This field MUST NOT be empty.* A file identifier.<br/> This identifies the file to which the `contents` will be appended.setFileID(FileID.Builder builderForValue) * A file identifier.<br/> This identifies the file to which the `contents` will be appended.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasFileID
public boolean hasFileID()* A file identifier.<br/> This identifies the file to which the `contents` will be appended. <p> This field is REQUIRED.<br/> The identified file MUST exist.<br/> The identified file MUST NOT be larger than the current maximum file size limit.<br/> The identified file MUST NOT be deleted.<br/> The identified file MUST NOT be immutable.
.proto.FileID fileID = 2;- Specified by:
hasFileIDin interfaceFileAppendTransactionBodyOrBuilder- Returns:
- Whether the fileID field is set.
-
getFileID
* A file identifier.<br/> This identifies the file to which the `contents` will be appended. <p> This field is REQUIRED.<br/> The identified file MUST exist.<br/> The identified file MUST NOT be larger than the current maximum file size limit.<br/> The identified file MUST NOT be deleted.<br/> The identified file MUST NOT be immutable.
.proto.FileID fileID = 2;- Specified by:
getFileIDin interfaceFileAppendTransactionBodyOrBuilder- Returns:
- The fileID.
-
setFileID
* A file identifier.<br/> This identifies the file to which the `contents` will be appended. <p> This field is REQUIRED.<br/> The identified file MUST exist.<br/> The identified file MUST NOT be larger than the current maximum file size limit.<br/> The identified file MUST NOT be deleted.<br/> The identified file MUST NOT be immutable.
.proto.FileID fileID = 2; -
setFileID
* A file identifier.<br/> This identifies the file to which the `contents` will be appended. <p> This field is REQUIRED.<br/> The identified file MUST exist.<br/> The identified file MUST NOT be larger than the current maximum file size limit.<br/> The identified file MUST NOT be deleted.<br/> The identified file MUST NOT be immutable.
.proto.FileID fileID = 2; -
mergeFileID
* A file identifier.<br/> This identifies the file to which the `contents` will be appended. <p> This field is REQUIRED.<br/> The identified file MUST exist.<br/> The identified file MUST NOT be larger than the current maximum file size limit.<br/> The identified file MUST NOT be deleted.<br/> The identified file MUST NOT be immutable.
.proto.FileID fileID = 2; -
clearFileID
* A file identifier.<br/> This identifies the file to which the `contents` will be appended. <p> This field is REQUIRED.<br/> The identified file MUST exist.<br/> The identified file MUST NOT be larger than the current maximum file size limit.<br/> The identified file MUST NOT be deleted.<br/> The identified file MUST NOT be immutable.
.proto.FileID fileID = 2; -
getContents
public com.google.protobuf.ByteString getContents()* An array of bytes to append.<br/> <p> This content SHALL be appended to the identified file if this transaction succeeds.<br/> This field is REQUIRED.<br/> This field MUST NOT be empty.
bytes contents = 4;- Specified by:
getContentsin interfaceFileAppendTransactionBodyOrBuilder- Returns:
- The contents.
-
setContents
* An array of bytes to append.<br/> <p> This content SHALL be appended to the identified file if this transaction succeeds.<br/> This field is REQUIRED.<br/> This field MUST NOT be empty.
bytes contents = 4;- Parameters:
value- The contents to set.- Returns:
- This builder for chaining.
-
clearContents
* An array of bytes to append.<br/> <p> This content SHALL be appended to the identified file if this transaction succeeds.<br/> This field is REQUIRED.<br/> This field MUST NOT be empty.
bytes contents = 4;- Returns:
- This builder for chaining.
-