Class NetcdfFormatWriter.Builder<T extends NetcdfFormatWriter.Builder<T>>

  • Enclosing class:
    NetcdfFormatWriter

    public abstract static class NetcdfFormatWriter.Builder<T extends NetcdfFormatWriter.Builder<T>>
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setLocation

        public T setLocation​(String location)
        The file locatipn
      • setIsExisting

        public T setIsExisting()
      • setFill

        public T setFill​(boolean fill)
        Set the fill flag. Only used by netcdf-3. If true, the data is first written with fill values. Default is fill = true, to follow the C library. Set false if you expect to write all data values, which makes writing faster. Set true if you want to be sure that unwritten data values are set to the fill value.
      • setFormat

        public T setFormat​(NetcdfFileFormat format)
        Set the format version. Only needed when its a new file. Default is NetcdfFileFormat.NETCDF3
      • setExtraHeader

        public T setExtraHeader​(int extraHeaderBytes)
        Set extra bytes to reserve in the header. Only used by netcdf-3. This can prevent rewriting the entire file on redefine.
        Parameters:
        extraHeaderBytes - # bytes extra for the header
      • setPreallocateSize

        public T setPreallocateSize​(long preallocateSize)
        Preallocate the file size, for efficiency. Only used by netcdf-3.
      • setChunker

        public T setChunker​(Nc4Chunking chunker)
        Nc4Chunking, used only for netcdf4
      • setUseJna

        public T setUseJna​(boolean useJna)
        Set if you want to use JNA / netcdf c library to do the writing. Default is false. JNA must be used for Netcdf-4. This is used to write to Netcdf-3 format with jna.
      • addAttribute

        public T addAttribute​(Attribute att)
        Add a global attribute
      • addDimension

        public Dimension addDimension​(String dimName,
                                      int length)
        Add a dimension to the root group.
      • addDimension

        public Dimension addDimension​(Dimension dim)
        Add a dimension to the root group.
      • addUnlimitedDimension

        public Dimension addUnlimitedDimension​(String dimName)
        Add an unlimited dimension to the root group.
      • getRootGroup

        public Group.Builder getRootGroup()
        Get the root group
      • setRootGroup

        public T setRootGroup​(Group.Builder rootGroup)
        Set the root group. This allows metadata to be modified externally.