BrightSide Workbench Full Report + Source Code
org.turro.financials.book.IncomeBook Class Reference
Inheritance diagram for org.turro.financials.book.IncomeBook:
Collaboration diagram for org.turro.financials.book.IncomeBook:

Public Member Functions

void download ()
 
InputStream getExcel (String sheetName)
 

Static Public Member Functions

static IncomeBook from (int year)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 54 of file IncomeBook.java.

Member Function Documentation

◆ download()

void org.turro.financials.book.IncomeBook.download ( )

Definition at line 56 of file IncomeBook.java.

56  {
57  String name = ElephantContext.getSiteName() + "_IncomeBook.xls";
58  Filedownload.save(getExcel(name), new MimetypesFileTypeMap().getContentType(name), name);
59  }
InputStream getExcel(String sheetName)
Definition: IncomeBook.java:61
Here is the call graph for this function:

◆ from()

static IncomeBook org.turro.financials.book.IncomeBook.from ( int  year)
static

Definition at line 144 of file IncomeBook.java.

144  {
145  return new IncomeBook(year);
146  }

◆ getExcel()

InputStream org.turro.financials.book.IncomeBook.getExcel ( String  sheetName)

Definition at line 61 of file IncomeBook.java.

61  {
62  try {
63  ByteArrayOutputStream baos = new ByteArrayOutputStream();
64  WritableWorkbook ww = Workbook.createWorkbook(baos);
65  WritableSheet ws = ww.createSheet(sheetName, 0);
66  writeSheet(ws);
67  ww.write();
68  ww.close();
69  baos.close();
70  return new ByteArrayInputStream(baos.toByteArray());
71  } catch (WriteException | IOException ex) {
72  WebLoggers.severe(this).exception(ex).log();
73  }
74  return null;
75  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: