    001/*-
    002 *******************************************************************************
    003 * Copyright (c) 2011, 2016 Diamond Light Source Ltd.
    004 * All rights reserved. This program and the accompanying materials
    005 * are made available under the terms of the Eclipse Public License v1.0
    006 * which accompanies this distribution, and is available at
    007 * http://www.eclipse.org/legal/epl-v10.html
    008 *
    009 * Contributors:
    010 *    Peter Chang - initial API and implementation and/or initial documentation
    011 *******************************************************************************/
    012
    013package org.eclipse.january.io;
    014
    015import java.io.IOException;
    016
    017import org.eclipse.january.IMonitor;
    018import org.eclipse.january.metadata.IMetadata;
    019
    020
    021/**
    022 * Interface used to mark a loader as being available to load and return
    023 * metadata without loading the entire file into memory.
    024 */
    025public interface IMetaLoader {
    026
    027        /**
    028         * Loads the meta data from the file but not all the data.
    029         * This can be read in more cheaply than the entire data.
    030         * @param mon can be null
    031         * @throws IOException when cannot load metadata
    032         */
    033        public void loadMetadata(IMonitor mon) throws IOException ;
    034
    035        /**
    036         * Returns an object containing some data about the data file to be read in
    037         *
    038         * @return IMetadata
    039         */
    040        public IMetadata getMetadata();
    041}