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