From d114084922f839f36d5c6d98e2f250e11eacc39d Mon Sep 17 00:00:00 2001 From: mikaelpeltier Date: Mon, 23 Mar 2015 09:11:11 +0100 Subject: Add InputStreamProvider and OutputStreamProvider - Add common interface between VFile and StreamFile that will allow to read or write them. Change-Id: I1721932c7e68770edae53a431d4a9a3ca664ae72 --- .../android/sched/vfs/OutputStreamProvider.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sched/src/com/android/sched/vfs/OutputStreamProvider.java (limited to 'sched/src/com/android/sched/vfs/OutputStreamProvider.java') diff --git a/sched/src/com/android/sched/vfs/OutputStreamProvider.java b/sched/src/com/android/sched/vfs/OutputStreamProvider.java new file mode 100644 index 00000000..00970e0b --- /dev/null +++ b/sched/src/com/android/sched/vfs/OutputStreamProvider.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.sched.vfs; + +import com.android.sched.util.file.WrongPermissionException; + +import java.io.OutputStream; +import java.io.PrintStream; + +import javax.annotation.Nonnull; + +/** + * Provider of {@link OutputStreamProvider}. + */ +public interface OutputStreamProvider { + + @Nonnull + OutputStream getOutputStream() throws WrongPermissionException; + + @Nonnull + PrintStream getPrintStream() throws WrongPermissionException; +} -- cgit v1.2.3