source: trunk/icedtea-web/netx/javax/jnlp/ExtendedService.java

Last change on this file was 348, checked in by dmik, 13 years ago

vendor: Add icedtea-web v1.1.2 to current.

File size: 1.8 KB
Line 
1// Copyright (C) 2009 Red Hat, Inc.
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17package javax.jnlp;
18
19import java.io.File;
20import java.io.IOException;
21
22/**
23 * This interface provides a way for the JNLP application to open specific files
24 * in the client's system. It asks permission from the user before opening any
25 * files.
26 *
27 * @author <a href="mailto:omajid@redhat.com">Omair Majid</a>
28 *
29 */
30public interface ExtendedService {
31
32 /**
33 * Open a file on the client' system and return its contents. The user must
34 * grant permission to the application for this to work.
35 *
36 * @param file the file to open
37 * @return the opened file as a {@link FileContents} object
38 * @throws IOException on any io problems
39 */
40 FileContents openFile(File file) throws IOException;
41
42 /**
43 * Opens multiple files on the user's sytem and returns their contents as a
44 * {@link FileContents} array
45 *
46 * @param files the files to open
47 * @return an array of FileContents objects
48 * @throws IOException on any io problems
49 */
50 FileContents[] openFiles(File[] files) throws IOException;
51}
Note: See TracBrowser for help on using the repository browser.