15c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez/* 25c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * Copyright (C) 2017 The Android Open Source Project 35c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * 45c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * Licensed under the Apache License, Version 2.0 (the "License"); 55c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * you may not use this file except in compliance with the License. 65c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * You may obtain a copy of the License at 75c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * 85c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * http://www.apache.org/licenses/LICENSE-2.0 95c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * 105c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * Unless required by applicable law or agreed to in writing, software 115c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * distributed under the License is distributed on an "AS IS" BASIS, 125c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * See the License for the specific language governing permissions and 145c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez * limitations under the License. 155c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez */ 165c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 175c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perezpackage com.android.layout.remote.util; 185c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 195c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perezimport java.io.IOException; 205c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perezimport java.rmi.Remote; 215c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perezimport java.rmi.RemoteException; 225c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 235c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perezpublic interface RemoteInputStream extends Remote { 245c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez int read() throws IOException; 255c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 265c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez byte[] read(int off, int len) throws IOException; 275c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 285c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez long skip(long n) throws IOException; 295c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 305c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez int available() throws IOException; 315c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 325c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez void close() throws IOException; 335c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 345c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez void mark(int readlimit) throws RemoteException; 355c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 365c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez void reset() throws IOException; 375c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 385c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez boolean markSupported() throws RemoteException; 395c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez 405c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez class EndOfStreamException extends IOException { 415c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez } 425c5efc433eb4cc81f59bcfaf28f5e72b38f7a829Diego Perez} 43