1 /*******************************************************************************
2 * Copyright 2011 See AUTHORS file.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 ******************************************************************************/
16 package com.badlogic.gdx.backends.ios;
18 import java.io.IOException;
19 import java.io.InputStream;
21 import cli.System.IO.Stream;
23 public class IOSStreamInput extends InputStream {
25 /** The stream for I/O operation. */
26 private Stream stream;
27 /** True if we can close the stream here. */
28 private boolean closeable;
31 public IOSStreamInput(Stream stream) {
35 public IOSStreamInput(Stream stream, boolean closeable) {
37 this.closeable = closeable;
41 public int available () throws IOException {
42 // NOTE: not supported!
47 public synchronized void mark (int readLimit) {
52 public boolean markSupported () {
57 public synchronized void reset () throws IOException {
62 public int read () throws IOException {
63 return stream.ReadByte();
67 public int read (byte[] b) throws IOException {
68 return read(b, 0, b.length);
72 public int read (byte[] b, int off, int len) throws IOException {
73 return stream.Read(b, off, len);
77 public void close () throws IOException {