Skip to content

jean-merelis/coffeepot-br-sintegra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coffeepot-br-sintegra

Project to be used in Brazil to write file in accordance to local regulations.

Este projeto é um mapeamento de classes Java para formatação e gravação do arquivo texto no layout definido para o SINTEGRA.

Projeto baseado em Maven. Utilizando JDK 1.7

Dependência: coffeepot-bean-wr - https://github.com/jom76/coffeepot-bean-wr

Documentação técnica e layout: http://www.sefaz.es.gov.br/LegislacaoOnline/lpext.dll/InfobaseLegislacaoOnline/ricms%20-%20dec%201090-r/08%20-%20anexos/090-anexo%20xxxvi.htm?fn=document-frame.htm&f=templates&2.0

###Maven central

        <dependency>
            <groupId>com.github.jean-merelis</groupId>
            <artifactId>coffeepot-br-sintegra</artifactId>
            <version>1.0.1-RC1</version>         
        </dependency> 

Exemplo:

	//Criando o escritor
	Writer fw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "ISO-8859-1"));       
	SintegraWriter sintegraWriter = new SintegraWriter(fw);
	
	//Objeto que contém a estrutura do arquivo
	Sintegra sintegra = new Sintegra();
	// informa os registros
	//sintegra.setRegistro...
	
	//após informar todos os registros, gerar os registros tipo 90
	sintegra.gerarRegistros90();
	
	//Escrever o objeto no arquivo
    sintegraWriter.write(sintegra);		

	sintegraWriter.flush();
    sintegraWriter.close();