Project

General

Profile

Download (2.09 KB) Statistics
| Branch: | Revision:

distorted-objectlib / src / main / java / org / distorted / objectlib / main / InitAssets.java @ 19c8e760

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is proprietary software licensed under an EULA which you should have received      //
7
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html        //
8
///////////////////////////////////////////////////////////////////////////////////////////////////
9

    
10
package org.distorted.objectlib.main;
11

    
12
import java.io.IOException;
13
import java.io.InputStream;
14

    
15
///////////////////////////////////////////////////////////////////////////////////////////////////
16

    
17
public class InitAssets
18
  {
19
  InputStream mJsonStream;
20
  InputStream mMeshStream;
21

    
22
///////////////////////////////////////////////////////////////////////////////////////////////////
23

    
24
  public InitAssets(InputStream jsonStream, InputStream meshStream)
25
    {
26
    mJsonStream = jsonStream;
27
    mMeshStream = meshStream;
28
    }
29

    
30
///////////////////////////////////////////////////////////////////////////////////////////////////
31

    
32
  public boolean noJsonStream()
33
    {
34
    return mJsonStream==null;
35
    }
36

    
37
///////////////////////////////////////////////////////////////////////////////////////////////////
38

    
39
  public InputStream getJsonStream()
40
    {
41
    return mJsonStream;
42
    }
43

    
44
///////////////////////////////////////////////////////////////////////////////////////////////////
45

    
46
  public InputStream getMeshStream()
47
    {
48
    return mMeshStream;
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
    }
62
}
(1-1/11)