1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/io/nsIOUtil.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 "nsIOUtil.h" 1.10 +#include "nsIInputStream.h" 1.11 +#include "nsIOutputStream.h" 1.12 +#include "nsStreamUtils.h" 1.13 + 1.14 +NS_IMPL_ISUPPORTS(nsIOUtil, nsIIOUtil) 1.15 + 1.16 +NS_IMETHODIMP 1.17 +nsIOUtil::InputStreamIsBuffered(nsIInputStream* aStream, bool* _retval) 1.18 +{ 1.19 + if (NS_WARN_IF(!aStream)) 1.20 + return NS_ERROR_INVALID_ARG; 1.21 + *_retval = NS_InputStreamIsBuffered(aStream); 1.22 + return NS_OK; 1.23 +} 1.24 + 1.25 +NS_IMETHODIMP 1.26 +nsIOUtil::OutputStreamIsBuffered(nsIOutputStream* aStream, bool* _retval) 1.27 +{ 1.28 + if (NS_WARN_IF(!aStream)) 1.29 + return NS_ERROR_INVALID_ARG; 1.30 + *_retval = NS_OutputStreamIsBuffered(aStream); 1.31 + return NS_OK; 1.32 +}