Corrections.
[SquirrelJME.git] / modules / ntt-docomo-doja-api / src / main / java / com / nttdocomo / ui / MediaResource.java
blob9c77b7aa9fd2b73b4a059c30bf7fb22e4d76531f
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package com.nttdocomo.ui;
12 import cc.squirreljme.runtime.cldc.annotation.Api;
13 import com.nttdocomo.io.ConnectionException;
15 public interface MediaResource
17 /**
18 * Disposes of the resource so that it no longer can be used.
20 * @throws UIException If the resource has already been disposed.
21 * @since 2022/02/14
23 @Api
24 void dispose()
25 throws UIException;
27 /**
28 * Specifies that the media should stop being used and frees up
29 * resources for it. Note that the actual resource in its original
30 * location
31 * is retained for the next {@link #use()} of which this becomes
32 * available.
34 * @throws UIException If the resource could not be freed.
35 * @since 2022/02/14
37 @Api
38 void unuse()
39 throws UIException;
41 /**
42 * Specifies that the resource is to be used now, it will be loaded from
43 * the backing resource and will hold a representation of the data. This
44 * in a sense opens the data.
46 * @throws ConnectionException If the connection could not be made.
47 * @throws SecurityException If the operation is not supported due to
48 * a security mechanism.
49 * @throws UIException If the resource could not be opened.
50 * @since 2022/02/14
52 @Api
53 void use()
54 throws ConnectionException, SecurityException, UIException;