private void Close(URLConnection urlConnection) { try { urlConnection.GetInputStream().Close(); } catch (IOException e) { OnFailedClosingUrlConnection(urlConnection, e); } }
/// <summary> /// Decrypt an input stream from /// <see cref="Get(string, string)">Get(string, string)</see> /// . /// </summary> /// <param name="u"> /// connection previously created by /// <see cref="Get(string, string)">Get(string, string)</see> /// }. /// </param> /// <returns>stream to read plain text from.</returns> /// <exception cref="System.IO.IOException">decryption could not be configured.</exception> public virtual InputStream Decrypt(URLConnection u) { return encryption.Decrypt(u.GetInputStream()); }
/// <exception cref="System.IO.IOException"></exception> private static TextReader GetReader(URLConnection urlConnection) { return new StreamReader(urlConnection.GetInputStream(), GetCharacterEncoding(urlConnection)); }