Bom dia Pessoal, estou com um código em Delphi e preciso converte-lo para java só tem coisas que não sei como converter será que alguém pode me dar uma força? VLW OBRIGADO.
//////////////////////////////////////////////////////////
// Esta função verifica se o Gerenciador Padrão está ATIVO
//////////////////////////////////////////////////////////
function VerificaGerenciadorPadrao;
var
cConteudoArquivo: string;
cIdentificacao : TDateTime;
cArquivo : TextFile;
iTentativas : integer;
lFlag : longbool;
begin
AssignFile( cArquivo, 'INTPOS.001');
cConteudoArquivo := '';
cIdentificacao := Time;
cConteudoArquivo := '000-000 = ATV' + #13 + #10 +
'001-000 = ' + FormatDateTime( 'hhmmss', cIdentificacao )
+ #13 + #10 +
'999-999 = 0';
ReWrite( cArquivo );
WriteLn( cArquivo, cConteudoArquivo );
CloseFile( cArquivo );
CopyFile( pchar( 'INTPOS.001' ),
pchar( 'C:\TEF_DIAL\REQ\INTPOS.001' ), lFlag );
DeleteFile( 'INTPOS.001' );
for iTentativas := 1 to 7 do
begin
if ( FileExists( 'C:\TEF_DIAL\RESP\ATIVO.001' ) ) or
( FileExists( 'C:\TEF_DIAL\RESP\INTPOS.STS' ) ) then
begin
Application.MessageBox( 'O Gerencial Padrão se encontra ATIVO !',
'Atenção', MB_IconInformation + MB_OK );
break;
end;
Sleep( 1000 );
if ( iTentativas = 7 ) then
begin
Application.MessageBox( 'O Gerencial Padrão INATIVO!',
'Atenção',
MB_IconInformation + MB_OK );
Break;
end;
end;
end;