001/***************************************************************************** 002 * Copyright by The HDF Group. * 003 * Copyright by the Board of Trustees of the University of Illinois. * 004 * All rights reserved. * 005 * * 006 * This file is part of the HDF Java Products distribution. * 007 * The full copyright notice, including terms governing use, modification, * 008 * and redistribution, is contained in the COPYING file, which can be found * 009 * at the root of the source code distribution tree, * 010 * or in https://www.hdfgroup.org/licenses. * 011 * If you do not have access to either file, you may request a copy from * 012 * help@hdfgroup.org. * 013 ****************************************************************************/ 014 015package hdf.object.h5; 016 017import hdf.hdf5lib.H5; 018import hdf.hdf5lib.HDF5Constants; 019import hdf.hdf5lib.exceptions.HDF5Exception; 020 021import org.slf4j.Logger; 022import org.slf4j.LoggerFactory; 023 024/** HDF5 plugin utility class */ 025public final class H5Plugins { 026 027 private static final Logger log = LoggerFactory.getLogger(H5Plugins.class); 028 029 private static long totalPaths; 030 031 /** 032 * Creates a list of plugin paths for HDFView. 033 * 034 */ 035 public H5Plugins() 036 { 037 totalPaths = H5.H5PLsize(); // initial number of paths 038 } 039 040 /** 041 * Get the total number of paths for the HDF5 library. 042 * 043 * @return total number of plugin paths 044 * 045 * @throws HDF5Exception If there is an error at the HDF5 library level. 046 */ 047 public static final long getTotalPluginPaths() throws HDF5Exception 048 { 049 totalPaths = H5.H5PLsize(); 050 051 log.trace("getTotalPluginPaths(): total plugin paths {}", totalPaths); 052 053 return totalPaths; 054 } 055}