Class FileInfo

java.lang.Object
com.hedera.hashgraph.sdk.FileInfo

public final class FileInfo extends Object
Current information for a file, including its size. See Hedera Documentation
  • Field Details

    • fileId

      public final FileId fileId
      The ID of the file for which information is requested.
    • size

      public final long size
      Number of bytes in contents.
    • expirationTime

      public final Instant expirationTime
      The current time at which this account is set to expire.
    • isDeleted

      public final boolean isDeleted
      True if deleted but not yet expired.
    • keys

      @Nullable public final KeyList keys
      One of these keys must sign in order to delete the file. All of these keys must sign in order to update the file.
    • fileMemo

      public final String fileMemo
      The memo associated with the file
    • ledgerId

      public final LedgerId ledgerId
      The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs.
  • Method Details

    • fromProtobuf

      static FileInfo fromProtobuf(FileGetInfoResponse.FileInfo fileInfo)
      Create a file info object from a ptotobuf.
      Parameters:
      fileInfo - the protobuf
      Returns:
      the new file info object
    • fromBytes

      public static FileInfo fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Create a file info object from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      the new file info object
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • toProtobuf

      Create the protobuf.
      Returns:
      the protobuf representation
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBytes

      public byte[] toBytes()
      Create the byte array.
      Returns:
      the byte array representation