1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/io/nsIIOUtil.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +interface nsIInputStream; 1.12 +interface nsIOutputStream; 1.13 + 1.14 +/** 1.15 + * nsIIOUtil provdes various xpcom/io-related utility methods. 1.16 + */ 1.17 +[scriptable, uuid(e8152f7f-4209-4c63-ad23-c3d2aa0c5a49)] 1.18 +interface nsIIOUtil : nsISupports 1.19 +{ 1.20 + /** 1.21 + * Test whether an input stream is buffered. See nsStreamUtils.h 1.22 + * documentation for NS_InputStreamIsBuffered for the definition of 1.23 + * "buffered" used here and for edge-case behavior. 1.24 + * 1.25 + * @throws NS_ERROR_INVALID_POINTER if null is passed in. 1.26 + */ 1.27 + boolean inputStreamIsBuffered(in nsIInputStream aStream); 1.28 + 1.29 + /** 1.30 + * Test whether an output stream is buffered. See nsStreamUtils.h 1.31 + * documentation for NS_OutputStreamIsBuffered for the definition of 1.32 + * "buffered" used here and for edge-case behavior. 1.33 + * 1.34 + * @throws NS_ERROR_INVALID_POINTER if null is passed in. 1.35 + */ 1.36 + boolean outputStreamIsBuffered(in nsIOutputStream aStream); 1.37 +};