1090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson/* 21d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Copyright (C) 2007 The Guava Authors 3090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 4090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * Licensed under the Apache License, Version 2.0 (the "License"); 5090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * you may not use this file except in compliance with the License. 6090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * You may obtain a copy of the License at 7090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 8090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * http://www.apache.org/licenses/LICENSE-2.0 9090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 10090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * Unless required by applicable law or agreed to in writing, software 11090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * distributed under the License is distributed on an "AS IS" BASIS, 12090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * See the License for the specific language governing permissions and 14090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * limitations under the License. 15090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson */ 16090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 17bfe2dd089341dcb4c1fb65a5b6b077ad0ebbf6dcDan Egnorpackage com.google.common.io; 18bfe2dd089341dcb4c1fb65a5b6b077ad0ebbf6dcDan Egnor 19bfe2dd089341dcb4c1fb65a5b6b077ad0ebbf6dcDan Egnorimport java.io.IOException; 20090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 21090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson/** 22bfe2dd089341dcb4c1fb65a5b6b077ad0ebbf6dcDan Egnor * A factory for readable streams of bytes or characters. 23090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 24bfe2dd089341dcb4c1fb65a5b6b077ad0ebbf6dcDan Egnor * @author Chris Nokleberg 251d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * @since 1.0 26090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson */ 27bfe2dd089341dcb4c1fb65a5b6b077ad0ebbf6dcDan Egnorpublic interface InputSupplier<T> { 281d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert 291d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert /** 301d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Returns an object that encapsulates a readable resource. 311d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * <p> 321d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Like {@link Iterable#iterator}, this method may be called repeatedly to 331d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * get independent channels to the same underlying resource. 341d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * <p> 351d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Where the channel maintains a position within the resource, moving that 361d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * cursor within one channel should not affect the starting position of 371d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * channels returned by other calls. 381d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert */ 39bfe2dd089341dcb4c1fb65a5b6b077ad0ebbf6dcDan Egnor T getInput() throws IOException; 40090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson} 41