Revision 440f8e33
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/objectlib/json/JsonReader.java | ||
---|---|---|
13 | 13 |
import static org.distorted.objectlib.scrambling.ScrambleStateBandagedCuboid.MAX_SUPPORTED_SIZE; |
14 | 14 |
|
15 | 15 |
import java.io.BufferedReader; |
16 |
import java.io.File; |
|
17 |
import java.io.FileInputStream; |
|
18 | 16 |
import java.io.IOException; |
19 | 17 |
import java.io.InputStream; |
20 | 18 |
import java.io.InputStreamReader; |
21 | 19 |
import java.nio.charset.StandardCharsets; |
22 | 20 |
|
23 |
import android.content.Context; |
|
24 |
|
|
25 | 21 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
26 | 22 |
import org.distorted.objectlib.helpers.ObjectSignature; |
27 | 23 |
import org.distorted.objectlib.helpers.ObjectStickerOverride; |
... | ... | |
749 | 745 |
|
750 | 746 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
751 | 747 |
|
752 |
public void readNumScramblesAndPrice(Context context, String fileName) throws IOException, JSONException
|
|
748 |
public void readNumScramblesAndPrice(InputStream stream) throws IOException, JSONException
|
|
753 | 749 |
{ |
754 |
File file = new File(context.getFilesDir(), fileName); |
|
755 |
InputStream stream = new FileInputStream(file); |
|
756 | 750 |
BufferedReader br = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8)); |
757 | 751 |
|
758 | 752 |
StringBuilder contents = new StringBuilder(); |
Also available in: Unified diff
remove all references to android.Context and android.Activity from distorted-objectlib