void FileReader::readAsBinaryString(Blob* blob, ExceptionCode& ec) { if (!blob) return; LOG(FileAPI, "FileReader: reading as binary: %s %s\n", utf8BlobURL(blob).data(), utf8FilePath(blob).data()); readInternal(blob, FileReaderLoader::ReadAsBinaryString, ec); }
void FileReader::readAsText(Blob* blob, const String& encoding, ExceptionCode& ec) { if (!blob) return; LOG(FileAPI, "FileReader: reading as text: %s %s\n", utf8BlobURL(blob).data(), utf8FilePath(blob).data()); m_encoding = encoding; readInternal(blob, FileReaderLoader::ReadAsText, ec); }
void FileReader::readAsDataURL(Blob* blob, ExceptionState& exceptionState) { if (!blob) { exceptionState.throwTypeError("The argument is not a Blob."); return; } WTF_LOG(FileAPI, "FileReader: reading as data URL: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data()); readInternal(blob, FileReaderLoader::ReadAsDataURL, exceptionState); }
void FileReader::readAsText(Blob* blob, const String& encoding, ExceptionState& exceptionState) { if (!blob) { exceptionState.throwTypeError("The argument is not a Blob."); return; } WTF_LOG(FileAPI, "FileReader: reading as text: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data()); m_encoding = encoding; readInternal(blob, FileReaderLoader::ReadAsText, exceptionState); }
void FileReader::readAsArrayBuffer(Blob* blob, ExceptionCode& ec) { if (!blob) return; LOG(FileAPI, "FileReader: reading as array buffer: %s %s\n", utf8BlobURL(blob).data(), utf8FilePath(blob).data()); readInternal(blob, FileReaderLoader::ReadAsArrayBuffer, ec); }
void FileReader::readAsDataURL(Blob* blob, ExceptionState& exceptionState) { ASSERT(blob); WTF_LOG(FileAPI, "FileReader: reading as data URL: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data()); readInternal(blob, FileReaderLoader::ReadAsDataURL, exceptionState); }
void FileReader::readAsText(Blob* blob, const String& encoding, ExceptionState& exceptionState) { ASSERT(blob); WTF_LOG(FileAPI, "FileReader: reading as text: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data()); m_encoding = encoding; readInternal(blob, FileReaderLoader::ReadAsText, exceptionState); }
void FileReader::readAsArrayBuffer(Blob* blob, ExceptionState& exceptionState) { ASSERT(blob); WTF_LOG(FileAPI, "FileReader: reading as array buffer: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data()); readInternal(blob, FileReaderLoader::ReadAsArrayBuffer, exceptionState); }