|
|
@@ -8104,8 +8104,6 @@ int64 FileInputStream::getTotalLength() |
|
|
|
|
|
|
|
|
int FileInputStream::read (void* buffer, int bytesToRead) |
|
|
int FileInputStream::read (void* buffer, int bytesToRead) |
|
|
{ |
|
|
{ |
|
|
int num = 0; |
|
|
|
|
|
|
|
|
|
|
|
if (needToSeek) |
|
|
if (needToSeek) |
|
|
{ |
|
|
{ |
|
|
if (juce_fileSetPosition (fileHandle, currentPosition) < 0) |
|
|
if (juce_fileSetPosition (fileHandle, currentPosition) < 0) |
|
|
@@ -8114,10 +8112,10 @@ int FileInputStream::read (void* buffer, int bytesToRead) |
|
|
needToSeek = false; |
|
|
needToSeek = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
num = readInternal (buffer, bytesToRead); |
|
|
|
|
|
|
|
|
const size_t num = readInternal (buffer, bytesToRead); |
|
|
currentPosition += num; |
|
|
currentPosition += num; |
|
|
|
|
|
|
|
|
return num; |
|
|
|
|
|
|
|
|
return (int) num; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool FileInputStream::isExhausted() |
|
|
bool FileInputStream::isExhausted() |
|
|
@@ -9279,7 +9277,7 @@ namespace URLHelpers |
|
|
|
|
|
|
|
|
// just a short text attachment, so use simple url encoding.. |
|
|
// just a short text attachment, so use simple url encoding.. |
|
|
headers << "Content-Type: application/x-www-form-urlencoded\r\nContent-length: " |
|
|
headers << "Content-Type: application/x-www-form-urlencoded\r\nContent-length: " |
|
|
<< postData.getSize() << "\r\n"; |
|
|
|
|
|
|
|
|
<< (unsigned int) postData.getSize() << "\r\n"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@@ -9984,7 +9982,7 @@ bool MemoryOutputStream::write (const void* const buffer, int howMany) |
|
|
const size_t storageNeeded = position + howMany; |
|
|
const size_t storageNeeded = position + howMany; |
|
|
|
|
|
|
|
|
if (storageNeeded >= data.getSize()) |
|
|
if (storageNeeded >= data.getSize()) |
|
|
data.ensureSize ((storageNeeded + jmin (storageNeeded / 2, (size_t) (1024 * 1024)) + 32) & ~31); |
|
|
|
|
|
|
|
|
data.ensureSize ((storageNeeded + jmin ((int) (storageNeeded / 2), 1024 * 1024) + 32) & ~31); |
|
|
|
|
|
|
|
|
memcpy (static_cast<char*> (data.getData()) + position, buffer, howMany); |
|
|
memcpy (static_cast<char*> (data.getData()) + position, buffer, howMany); |
|
|
position += howMany; |
|
|
position += howMany; |
|
|
@@ -10042,12 +10040,12 @@ const String MemoryOutputStream::toUTF8() const |
|
|
|
|
|
|
|
|
const String MemoryOutputStream::toString() const |
|
|
const String MemoryOutputStream::toString() const |
|
|
{ |
|
|
{ |
|
|
return String::createStringFromData (getData(), getDataSize()); |
|
|
|
|
|
|
|
|
return String::createStringFromData (getData(), (int) getDataSize()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const MemoryOutputStream& streamToRead) |
|
|
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const MemoryOutputStream& streamToRead) |
|
|
{ |
|
|
{ |
|
|
stream.write (streamToRead.getData(), streamToRead.getDataSize()); |
|
|
|
|
|
|
|
|
stream.write (streamToRead.getData(), (int) streamToRead.getDataSize()); |
|
|
return stream; |
|
|
return stream; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|