Skip to content

Instantly share code, notes, and snippets.

@freeonterminate
Created December 16, 2015 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freeonterminate/8579d4ac5142efbe77a4 to your computer and use it in GitHub Desktop.
Save freeonterminate/8579d4ac5142efbe77a4 to your computer and use it in GitHub Desktop.
Android 4.x で THttpClient.Get の引数に TFileStream を使うと動作しない件の修正ユニット
unit uFileStreamFixForAndroid4;
interface
uses
System.Classes
, System.SysUtils
;
type
TFileStream = class(System.Classes.TFileStream)
public
function Write(
const Buffer: TBytes;
Offset, Count: Integer): Longint; override;
end;
implementation
{ TFileStream }
function TFileStream.Write(
const Buffer: TBytes;
Offset, Count: Integer): Longint;
begin
Result := FileWrite(Handle, Buffer[Offset], Count);
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment