001/*- 002 * Copyright 2015, 2016 Diamond Light Source Ltd. 003 * 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 010package org.eclipse.january.io; 011 012import java.io.IOException; 013 014import org.eclipse.january.IMonitor; 015import org.eclipse.january.dataset.IDataset; 016import org.eclipse.january.dataset.SliceND; 017 018/** 019 * Used by lazy writeable datasets to write slices to a file 020 */ 021public interface ILazySaver extends ILazyLoader { 022 public static final long serialVersionUID = 1366057382940519510L; 023 024 /** 025 * Initialize dataset in file 026 * @throws IOException 027 */ 028 public void initialize() throws IOException; 029 030 /** 031 * 032 * @return true if file is writeable 033 */ 034 public boolean isFileWriteable(); 035 036 /** 037 * @param mon 038 * @param data 039 * @param slice 040 * @throws IOException 041 */ 042 public void setSlice(IMonitor mon, IDataset data, SliceND slice) throws IOException; 043}