nsIScriptableBase64Encoder

nsIScriptableBase64Encoder

Bug 661529 - Make <canvas>.toDataURL more efficient. にて 2011-06-08 頃に追加


[scriptable, uuid(9479c864-d1f9-45ab-b7b9-28b907bd2ba9)]
interface nsIScriptableBase64Encoder : nsISupports

methods

/**
 *  These methods take an nsIInputStream and return a narrow or wide
 *  string with the contents of the nsIInputStream base64 encoded.
 *
 *  The stream passed in must support ReadSegments and must not be
 *  a non-blocking stream that will return NS_BASE_STREAM_WOULD_BLOCK.
 *  If either of these restrictions are violated we will abort.
 */
 ACString encodeToCString(in nsIInputStream stream, in unsigned long length);

 AString encodeToString(in nsIInputStream stream, in unsigned long length);