This repository has been archived by the owner on Dec 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35d3f40
commit 054c4c1
Showing
7 changed files
with
61 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.maxwittig.reportgenerator.utils | ||
|
||
import java.io.BufferedInputStream | ||
import java.io.BufferedReader | ||
import java.io.InputStreamReader | ||
|
||
|
||
class FileUtils | ||
{ | ||
|
||
companion object | ||
{ | ||
fun getFileContentFromJar(path: String): String? | ||
{ | ||
val inputStream = FileUtils::class.java.getResourceAsStream(path) | ||
val bufferedInputStream = BufferedInputStream(inputStream) | ||
val bufferedReader = BufferedReader(InputStreamReader(bufferedInputStream)) | ||
var line: String? = "" | ||
val text = StringBuilder() | ||
|
||
while (line != null) | ||
{ | ||
line = bufferedReader.readLine() | ||
if (line != null) | ||
text.append(line) | ||
} | ||
return text.toString() | ||
} | ||
} | ||
} |