root/trunk/components/common/src/ome/api/RawFileStore.java
| Revision 1348, 1.6 kB (checked in by callan, 22 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | /* |
| 2 | * ome.services.RawFileStore |
| 3 | * |
| 4 | * Copyright 2006 University of Dundee. All rights reserved. |
| 5 | * Use is subject to license terms supplied in LICENSE.txt |
| 6 | */ |
| 7 | |
| 8 | package ome.api; |
| 9 | |
| 10 | /** |
| 11 | * Raw file gateway which provides access to the OMERO file repository. |
| 12 | * |
| 13 | * @author Chris Allan <a |
| 14 | * href="mailto:callan@blackcat.ca">callan@blackcat.ca</a> |
| 15 | * @version 3.0 <small> (<b>Internal version:</b> $Revision$ $Date: |
| 16 | * 2005/06/08 15:21:59 $) </small> |
| 17 | * @since OMERO3.0 |
| 18 | */ |
| 19 | public interface RawFileStore extends StatefulServiceInterface { |
| 20 | /** |
| 21 | * This method manages the state of the service. |
| 22 | * |
| 23 | * @param fileId |
| 24 | * an {@link ome.model.core.OriginalFile} id. |
| 25 | */ |
| 26 | public void setFileId(long fileId); |
| 27 | |
| 28 | /** |
| 29 | * Checks to see if a raw file exists with the file ID that the service was |
| 30 | * initialized with. |
| 31 | * @return <code>true</code> if there is an accessible file within the |
| 32 | * original file repository with the correct ID. Otherwise |
| 33 | * <code>false</code>. |
| 34 | * @throws ResourceError if there is a problem accessing the file due to |
| 35 | * permissions errors within the repository or any other I/O error. |
| 36 | */ |
| 37 | public boolean exists(); |
| 38 | |
| 39 | /** |
| 40 | * Delegates to {@link ome.io.nio.FileBuffer} |
| 41 | * |
| 42 | * @see ome.io.nio.FileBuffer#read(java.nio.ByteBuffer, long) |
| 43 | */ |
| 44 | public byte[] read(long position, int length); |
| 45 | |
| 46 | /** |
| 47 | * Delegates to {@link ome.io.nio.FileBuffer} |
| 48 | * |
| 49 | * @see ome.io.nio.FileBuffer#write(java.nio.ByteBuffer, long) |
| 50 | */ |
| 51 | public void write(byte[] buf, long position, int length); |
| 52 | } |
Note: See TracBrowser
for help on using the browser.
