Class DensityMapTooLargeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.biojava.nbio.structure.io.density.DensityMapTooLargeException
All Implemented Interfaces:
Serializable

public class DensityMapTooLargeException extends IOException
Thrown when a density map exceeds the configured download size limit.

Cryo-EM primary maps in particular can be very large — hundreds of megabytes is common and gigabyte maps exist — while a downsampled slice of the same map from a density server is usually a fraction of a percent of that size and quite adequate for display. Rather than failing, the fallback chain treats this as "try the next source", which is exactly why the density servers are tried ahead of the full-resolution archives.

Since:
7.3.0
Author:
Amr ALHOSSARY
See Also:
  • Constructor Details

    • DensityMapTooLargeException

      public DensityMapTooLargeException(String url, long sizeBytes, long limitBytes)
      Parameters:
      url - the resource that was too large
      sizeBytes - its size, or a negative value if only a lower bound is known
      limitBytes - the configured limit
  • Method Details

    • getSizeBytes

      public long getSizeBytes()
      Returns:
      the size of the resource in bytes, or a negative value if unknown
    • getLimitBytes

      public long getLimitBytes()
      Returns:
      the configured limit in bytes