Revision 19c8e760
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/objectlib/main/InitAssets.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package org.distorted.objectlib.main; |
11 | 11 |
|
12 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
13 |
|
|
12 |
import java.io.IOException; |
|
14 | 13 |
import java.io.InputStream; |
15 | 14 |
|
15 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
16 |
|
|
16 | 17 |
public class InitAssets |
17 | 18 |
{ |
18 | 19 |
InputStream mJsonStream; |
19 | 20 |
InputStream mMeshStream; |
20 | 21 |
|
21 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
22 |
|
|
23 |
public InitAssets(InputStream jsonStream) |
|
24 |
{ |
|
25 |
mJsonStream = jsonStream; |
|
26 |
} |
|
27 |
|
|
28 | 22 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
29 | 23 |
|
30 | 24 |
public InitAssets(InputStream jsonStream, InputStream meshStream) |
... | ... | |
53 | 47 |
{ |
54 | 48 |
return mMeshStream; |
55 | 49 |
} |
50 |
|
|
51 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
52 |
|
|
53 |
public void close() |
|
54 |
{ |
|
55 |
try |
|
56 |
{ |
|
57 |
if( mJsonStream!=null ) mJsonStream.close(); |
|
58 |
if( mMeshStream!=null ) mMeshStream.close(); |
|
59 |
} |
|
60 |
catch(IOException ignored) {} |
|
61 |
} |
|
56 | 62 |
} |
Also available in: Unified diff
Close assets after use.