projects
/
meviz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0c8606b
)
Moved to Java 8. Code cleanup.
author
Svjatoslav Agejenko
<svjatoslav@svjatoslav.eu>
Tue, 12 Jul 2016 13:11:20 +0000
(16:11 +0300)
committer
Svjatoslav Agejenko
<svjatoslav@svjatoslav.eu>
Tue, 12 Jul 2016 13:11:20 +0000
(16:11 +0300)
41 files changed:
meviz.iml
patch
|
blob
|
history
pom.xml
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/bomremove/BomStrippingOptions.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/bomremove/CommandlineHandler.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/bomremove/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/encoder/CommandlineHandler.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/encoder/EncodingOptions.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/encoder/EncodingPlan.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/encoder/EncodingTask.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/encoder/converters/AbstractConverter.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/grabmemcard/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/AbstractIndexer.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/CommandlineHandler.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexRemover.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexer.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/ImageFormatError.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/IndexingContext.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/Layout.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/Utils.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/Dimension.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/DirectoryMetadata.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/MetadadaHelper.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/AbstractFile.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/renamer/CommandlineHandler.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/renamer/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/renamer/RenamingOptions.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/replace/CommandlineHandler.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/replace/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/textsplitter/CommandlineHandler.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/textsplitter/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/textsplitter/TextSplittingOptions.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/texttruncate/CommandlineHandler.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/texttruncate/Main.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/meviz/texttruncate/TextTruncatingOptions.java
patch
|
blob
|
history
diff --git
a/meviz.iml
b/meviz.iml
index
8cdc9f9
..
4ca17be
100644
(file)
--- a/
meviz.iml
+++ b/
meviz.iml
@@
-1,6
+1,6
@@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_
6
" inherit-compiler-output="false">
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_
8
" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
diff --git
a/pom.xml
b/pom.xml
index
7b104ea
..
9e07573
100644
(file)
--- a/
pom.xml
+++ b/
pom.xml
@@
-71,8
+71,8
@@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
- <source>1.
6
</source>
- <target>1.
6
</target>
+ <source>1.
8
</source>
+ <target>1.
8
</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
diff --git
a/src/main/java/eu/svjatoslav/meviz/Main.java
b/src/main/java/eu/svjatoslav/meviz/Main.java
index
9fc8f98
..
d1b9d51
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/Main.java
@@
-13,11
+13,11
@@
import eu.svjatoslav.meviz.encoder.Encoder;
import java.util.ArrayList;
import java.util.ArrayList;
-
public
class Main {
+class Main {
- p
ublic
static ArrayList<Module> modules;
+ p
rivate
static ArrayList<Module> modules;
- p
ublic
static String[] getRemainingOptions(final String[] options) {
+ p
rivate
static String[] getRemainingOptions(final String[] options) {
final String[] remainingOptions = new String[options.length - 1];
System.arraycopy(options, 1, remainingOptions, 0, options.length - 1);
final String[] remainingOptions = new String[options.length - 1];
System.arraycopy(options, 1, remainingOptions, 0, options.length - 1);
@@
-25,8
+25,8
@@
public class Main {
return remainingOptions;
}
return remainingOptions;
}
- p
ublic
static void initModules() {
- modules = new ArrayList<
Module
>();
+ p
rivate
static void initModules() {
+ modules = new ArrayList<>();
modules.add(new Encoder());
modules.add(new eu.svjatoslav.meviz.htmlindexer.Main());
modules.add(new Encoder());
modules.add(new eu.svjatoslav.meviz.htmlindexer.Main());
@@
-75,7
+75,7
@@
public class Main {
}
}
- p
ublic
static void showHelp() {
+ p
rivate
static void showHelp() {
final StringBuilder buffer = new StringBuilder();
buffer.append("Commandline options: \n"
final StringBuilder buffer = new StringBuilder();
buffer.append("Commandline options: \n"
diff --git
a/src/main/java/eu/svjatoslav/meviz/bomremove/BomStrippingOptions.java
b/src/main/java/eu/svjatoslav/meviz/bomremove/BomStrippingOptions.java
index
491f64f
..
364131c
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/bomremove/BomStrippingOptions.java
+++ b/
src/main/java/eu/svjatoslav/meviz/bomremove/BomStrippingOptions.java
@@
-14,7
+14,7
@@
import java.util.ArrayList;
public class BomStrippingOptions {
public class BomStrippingOptions {
- public
ArrayList<String> inputPatterns = new ArrayList<String
>();
+ public
final ArrayList<String> inputPatterns = new ArrayList<
>();
public boolean recursive = false;
public boolean recursive = false;
diff --git
a/src/main/java/eu/svjatoslav/meviz/bomremove/CommandlineHandler.java
b/src/main/java/eu/svjatoslav/meviz/bomremove/CommandlineHandler.java
index
367a7f2
..
627dbf8
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/bomremove/CommandlineHandler.java
+++ b/
src/main/java/eu/svjatoslav/meviz/bomremove/CommandlineHandler.java
@@
-16,19
+16,19
@@
import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParamet
import java.io.File;
import java.io.File;
-
public
class CommandlineHandler {
+class CommandlineHandler {
- Parser parser = new Parser();
+
final
Parser parser = new Parser();
- NullParameter recursiveParameter = parser.add(
+
private final
NullParameter recursiveParameter = parser.add(
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
- StringParameters inputPatternParameter = parser.add(
+
private final
StringParameters inputPatternParameter = parser.add(
new StringParameters("File input pattern.")).addAliases("-i",
"--input-pattern");
new StringParameters("File input pattern.")).addAliases("-i",
"--input-pattern");
- DirectoryParameter workingDirectoryParameter = parser
+
private final
DirectoryParameter workingDirectoryParameter = parser
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
diff --git
a/src/main/java/eu/svjatoslav/meviz/bomremove/Main.java
b/src/main/java/eu/svjatoslav/meviz/bomremove/Main.java
index
d792bb6
..
65c99da
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/bomremove/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/bomremove/Main.java
@@
-20,13
+20,13
@@
import java.util.Arrays;
public class Main implements Module {
public class Main implements Module {
- byte[] bomHeader = new byte[]{(byte) 0xef, (byte) 0xbb, (byte) 0xbf};
+
private final
byte[] bomHeader = new byte[]{(byte) 0xef, (byte) 0xbb, (byte) 0xbf};
- CommandlineHandler commandlineHandler = new CommandlineHandler();
+
private final
CommandlineHandler commandlineHandler = new CommandlineHandler();
- BomStrippingOptions options;
+
private
BomStrippingOptions options;
- p
ublic
boolean contains(final byte[] header, final byte[] patternToSeek) {
+ p
rivate
boolean contains(final byte[] header, final byte[] patternToSeek) {
for (int i = 0; i < patternToSeek.length; i++)
if (header[i] != patternToSeek[i])
for (int i = 0; i < patternToSeek.length; i++)
if (header[i] != patternToSeek[i])
@@
-35,7
+35,7
@@
public class Main implements Module {
return true;
}
return true;
}
- p
ublic
boolean fileContainsHeader(final File file)
+ p
rivate
boolean fileContainsHeader(final File file)
throws IOException {
final FileInputStream fileInputStream = new FileInputStream(file);
throws IOException {
final FileInputStream fileInputStream = new FileInputStream(file);
@@
-47,7
+47,7
@@
public class Main implements Module {
return contains(currentFileHeader, bomHeader);
}
return contains(currentFileHeader, bomHeader);
}
- p
ublic
boolean fileMatchesInputPattern(final File file) {
+ p
rivate
boolean fileMatchesInputPattern(final File file) {
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : options.inputPatterns)
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : options.inputPatterns)
@@
-67,7
+67,7
@@
public class Main implements Module {
return "stripbom";
}
return "stripbom";
}
- p
ublic
void processDirectory(final File directory) {
+ p
rivate
void processDirectory(final File directory) {
for (final File subFile : directory.listFiles())
if (subFile.isDirectory()) {
for (final File subFile : directory.listFiles())
if (subFile.isDirectory()) {
@@
-85,7
+85,7
@@
public class Main implements Module {
}
}
- p
ublic
void processFile(final File file) throws IOException {
+ p
rivate
void processFile(final File file) throws IOException {
if (file.length() < bomHeader.length)
return;
if (file.length() < bomHeader.length)
return;
@@
-116,7
+116,7
@@
public class Main implements Module {
commandlineHandler.parser.showHelp();
}
commandlineHandler.parser.showHelp();
}
- p
ublic
void stripFileFromHeader(final File file)
+ p
rivate
void stripFileFromHeader(final File file)
throws IOException {
// read entire file
final byte[] fileContents = IOHelper.getFileContents(file);
throws IOException {
// read entire file
final byte[] fileContents = IOHelper.getFileContents(file);
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/CommandlineHandler.java
b/src/main/java/eu/svjatoslav/meviz/encoder/CommandlineHandler.java
index
dc1601d
..
367742e
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/CommandlineHandler.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/CommandlineHandler.java
@@
-15,37
+15,37
@@
import eu.svjatoslav.commons.commandline.parameterparser.parameter.IntegerParame
import eu.svjatoslav.commons.commandline.parameterparser.parameter.NullParameter;
import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParameters;
import eu.svjatoslav.commons.commandline.parameterparser.parameter.NullParameter;
import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParameters;
-
public
class CommandlineHandler {
+class CommandlineHandler {
- Parser parser = new Parser();
+
final
Parser parser = new Parser();
- StringParameters outputFormatParameter = parser.add(new StringParameters("Encoding output format."))
+
private final
StringParameters outputFormatParameter = parser.add(new StringParameters("Encoding output format."))
.addAliases("-o", "--output-format").setMandatory();
.addAliases("-o", "--output-format").setMandatory();
- IntegerParameter targetFramerate = parser
+
private final
IntegerParameter targetFramerate = parser
.add(new IntegerParameter("Target framerate.").addAliases("-f", "--target-framerate"));
.add(new IntegerParameter("Target framerate.").addAliases("-f", "--target-framerate"));
- NullParameter deinterlaceParameter = parser.add(new NullParameter("Deinterlace video.")).addAliases("-d",
+
private final
NullParameter deinterlaceParameter = parser.add(new NullParameter("Deinterlace video.")).addAliases("-d",
"--deinterlace");
"--deinterlace");
- NullParameter testParameter = parser.add(new NullParameter("Simulate file encoding.")).addAliases("-t", "--test");
+
private final
NullParameter testParameter = parser.add(new NullParameter("Simulate file encoding.")).addAliases("-t", "--test");
- NullParameter recursiveParameter = parser.add(new NullParameter("Enable recursive mode.")).addAliases("-r",
+
private final
NullParameter recursiveParameter = parser.add(new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
"--recursive");
- NullParameter forPortableParameter = parser.add(new NullParameter("Encode for portable player.")).addAliases("-p",
+
private final
NullParameter forPortableParameter = parser.add(new NullParameter("Encode for portable player.")).addAliases("-p",
"--portable");
"--portable");
- StringParameters inputPatternParameter = parser.add(new StringParameters("File input pattern."))
+
private final
StringParameters inputPatternParameter = parser.add(new StringParameters("File input pattern."))
.addAliases("-i", "--input-pattern").setMandatory();
.addAliases("-i", "--input-pattern").setMandatory();
- DirectoryParameter workingDirectoryParameter = parser.add(new DirectoryParameter("Working directory."))
+
private final
DirectoryParameter workingDirectoryParameter = parser.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
.addAliases("-w", "--working-directory").mustExist();
- BitrateParameter videoBitrateParameter = parser.add(new BitrateParameter("Video bitrate")).addAliases("-v",
+
private final
BitrateParameter videoBitrateParameter = parser.add(new BitrateParameter("Video bitrate")).addAliases("-v",
"--video-bitrate");
"--video-bitrate");
- BitrateParameter audioBitrateParameter = parser.add(new BitrateParameter("Audio bitrate")).addAliases("-a",
+
private final
BitrateParameter audioBitrateParameter = parser.add(new BitrateParameter("Audio bitrate")).addAliases("-a",
"--audio-bitrate");
/**
"--audio-bitrate");
/**
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java
b/src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java
index
fda023e
..
2c5d088
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java
@@
-19,20
+19,17
@@
import java.util.List;
public class Encoder implements Module {
public class Encoder implements Module {
- public FormatsRegistry encoderRegistry = new FormatsRegistry();
-
- public EncodingOptions encodingOptions;
-
- public EncodingPlan encodingPlan;
-
- CommandlineHandler commandlineHandler = new CommandlineHandler();
+ private final FormatsRegistry encoderRegistry = new FormatsRegistry();
+ private final CommandlineHandler commandlineHandler = new CommandlineHandler();
+ private EncodingOptions encodingOptions;
+ private EncodingPlan encodingPlan;
/**
* Generate encoding plan
*
* @param sourceFile Source directory of file
*/
/**
* Generate encoding plan
*
* @param sourceFile Source directory of file
*/
- p
ublic
void compileEncodingPlan(final File sourceFile) {
+ p
rivate
void compileEncodingPlan(final File sourceFile) {
if (!sourceFile.exists()) {
System.out.println("Error: file \"" + sourceFile.getAbsolutePath()
+ "\" does not exist.");
if (!sourceFile.exists()) {
System.out.println("Error: file \"" + sourceFile.getAbsolutePath()
+ "\" does not exist.");
@@
-106,7
+103,7
@@
public class Encoder implements Module {
* @param file single file candidate to potentially be encoded
* @return <code>true</code> if file shall be encoded.
*/
* @param file single file candidate to potentially be encoded
* @return <code>true</code> if file shall be encoded.
*/
- p
ublic
boolean fileMatchesInputPattern(final File file) {
+ p
rivate
boolean fileMatchesInputPattern(final File file) {
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : encodingOptions.getInputPatterns())
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : encodingOptions.getInputPatterns())
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/EncodingOptions.java
b/src/main/java/eu/svjatoslav/meviz/encoder/EncodingOptions.java
index
b4efb1f
..
04e86e6
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/EncodingOptions.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/EncodingOptions.java
@@
-31,9
+31,9
@@
public class EncodingOptions {
private File workingDirectory = new File(System.getProperty("user.dir"));
private File workingDirectory = new File(System.getProperty("user.dir"));
- private List<String> outputFormats = new ArrayList<
String
>();
+ private List<String> outputFormats = new ArrayList<>();
- private List<String> inputPatterns = new ArrayList<
String
>();
+ private List<String> inputPatterns = new ArrayList<>();
public BitrateParameter.bitrate getAudioBitrate() {
return audioBitrate;
public BitrateParameter.bitrate getAudioBitrate() {
return audioBitrate;
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/EncodingPlan.java
b/src/main/java/eu/svjatoslav/meviz/encoder/EncodingPlan.java
index
0838d1a
..
49c52cc
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/EncodingPlan.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/EncodingPlan.java
@@
-9,15
+9,13
@@
package eu.svjatoslav.meviz.encoder;
package eu.svjatoslav.meviz.encoder;
-import java.io.IOException;
import java.util.ArrayList;
public class EncodingPlan {
import java.util.ArrayList;
public class EncodingPlan {
- p
ublic ArrayList<EncodingTask> encodingTasks = new ArrayList<EncodingTask
>();
+ p
rivate final ArrayList<EncodingTask> encodingTasks = new ArrayList<
>();
- public void execute(final EncodingOptions encodingOptions)
- throws IOException {
+ public void execute(final EncodingOptions encodingOptions) {
for (final EncodingTask task : encodingTasks)
task.execute(encodingOptions);
for (final EncodingTask task : encodingTasks)
task.execute(encodingOptions);
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/EncodingTask.java
b/src/main/java/eu/svjatoslav/meviz/encoder/EncodingTask.java
index
896ce15
..
67beb8c
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/EncodingTask.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/EncodingTask.java
@@
-41,11
+41,11
@@
public class EncodingTask {
/**
* @return the useTerminal
*/
/**
* @return the useTerminal
*/
- p
ublic
boolean doUseTerminal() {
+ p
rivate
boolean doUseTerminal() {
return useTerminal;
}
return useTerminal;
}
- p
ublic
String encodeApostrophes(final String input) {
+ p
rivate
String encodeApostrophes(final String input) {
final StringBuilder result = new StringBuilder();
for (final char c : input.toCharArray()) {
final StringBuilder result = new StringBuilder();
for (final char c : input.toCharArray()) {
@@
-80,7
+80,7
@@
public class EncodingTask {
}
}
- p
ublic
String getCommand(final EncodingOptions encodingOptions) {
+ p
rivate
String getCommand(final EncodingOptions encodingOptions) {
return converter.getCommand(source, target, encodingOptions, targetFormat);
}
return converter.getCommand(source, target, encodingOptions, targetFormat);
}
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java
b/src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java
index
7395c31
..
9870ced
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java
@@
-16,7
+16,7
@@
import java.util.List;
public class FormatsRegistry {
public class FormatsRegistry {
- p
ublic ArrayList<AbstractConverter> encoders = new ArrayList<AbstractConverter
>();
+ p
rivate final ArrayList<AbstractConverter> encoders = new ArrayList<
>();
public FormatsRegistry() {
// video conversion
public FormatsRegistry() {
// video conversion
@@
-42,7
+42,7
@@
public class FormatsRegistry {
final String sourceFormatLowerCase = sourceFormat.toLowerCase();
final String targetFormatLowerCase = targetFormat.toLowerCase();
final String sourceFormatLowerCase = sourceFormat.toLowerCase();
final String targetFormatLowerCase = targetFormat.toLowerCase();
- final ArrayList<AbstractConverter> encoders = new ArrayList<
AbstractConverter
>();
+ final ArrayList<AbstractConverter> encoders = new ArrayList<>();
for (final AbstractConverter encoder : this.encoders)
if (encoder.supportsSource(sourceFormatLowerCase))
for (final AbstractConverter encoder : this.encoders)
if (encoder.supportsSource(sourceFormatLowerCase))
@@
-54,7
+54,7
@@
public class FormatsRegistry {
return encoders;
}
return encoders;
}
- p
ublic
void registerEncoder(final AbstractConverter encoder) {
+ p
rivate
void registerEncoder(final AbstractConverter encoder) {
encoders.add(encoder);
}
encoders.add(encoder);
}
diff --git
a/src/main/java/eu/svjatoslav/meviz/encoder/converters/AbstractConverter.java
b/src/main/java/eu/svjatoslav/meviz/encoder/converters/AbstractConverter.java
index
322566b
..
0d935c1
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/encoder/converters/AbstractConverter.java
+++ b/
src/main/java/eu/svjatoslav/meviz/encoder/converters/AbstractConverter.java
@@
-21,9
+21,9
@@
public abstract class AbstractConverter {
public abstract String getCommand(File inputFile, File targetFile,
EncodingOptions options, String targetFormat);
public abstract String getCommand(File inputFile, File targetFile,
EncodingOptions options, String targetFormat);
- p
ublic
abstract List<String> getSourceFileExtensions();
+ p
rotected
abstract List<String> getSourceFileExtensions();
- p
ublic
abstract List<String> getTargetFileExtensions();
+ p
rotected
abstract List<String> getTargetFileExtensions();
/**
* For some reasons some encoders require terminal to run. Until this is
/**
* For some reasons some encoders require terminal to run. Until this is
@@
-39,8
+39,8
@@
public abstract class AbstractConverter {
return getTargetFileExtensions().contains(format);
}
return getTargetFileExtensions().contains(format);
}
-
public
List<String> toList(final String... strings) {
- final ArrayList<String> result = new ArrayList<
String
>();
+ List<String> toList(final String... strings) {
+ final ArrayList<String> result = new ArrayList<>();
Collections.addAll(result, strings);
Collections.addAll(result, strings);
diff --git
a/src/main/java/eu/svjatoslav/meviz/grabmemcard/Main.java
b/src/main/java/eu/svjatoslav/meviz/grabmemcard/Main.java
index
44faebc
..
ae9f42e
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/grabmemcard/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/grabmemcard/Main.java
@@
-31,7
+31,7
@@
public class Main implements Module {
return "Convenience helper to retrieve contents of inserted memory card.";
}
return "Convenience helper to retrieve contents of inserted memory card.";
}
- p
ublic
File[] getDiskVideos(final File file) {
+ p
rivate
File[] getDiskVideos(final File file) {
final String videosPath = file.getAbsolutePath() + "/AVCHD/BDMV/STREAM/";
final File videosDirectory = new File(videosPath);
final String videosPath = file.getAbsolutePath() + "/AVCHD/BDMV/STREAM/";
final File videosDirectory = new File(videosPath);
@@
-41,7
+41,7
@@
public class Main implements Module {
return videosDirectory.listFiles();
}
return videosDirectory.listFiles();
}
- p
ublic
String getDoubleDigit(final int value) {
+ p
rivate
String getDoubleDigit(final int value) {
String valueString = Integer.toString(value);
if (valueString.length() == 1)
valueString = "0" + valueString;
String valueString = Integer.toString(value);
if (valueString.length() == 1)
valueString = "0" + valueString;
@@
-61,7
+61,7
@@
public class Main implements Module {
}
@SuppressWarnings("deprecation")
}
@SuppressWarnings("deprecation")
- p
ublic
File getTargetDirectory() {
+ p
rivate
File getTargetDirectory() {
final Date now = new Date();
final GregorianCalendar calendar = new GregorianCalendar();
final Date now = new Date();
final GregorianCalendar calendar = new GregorianCalendar();
@@
-85,8
+85,7
@@
public class Main implements Module {
targetFilePath.append("/");
targetFilePath.append(FilePathParser.getFileNameWithoutExtension(sourceFile));
targetFilePath.append(".mp4");
targetFilePath.append("/");
targetFilePath.append(FilePathParser.getFileNameWithoutExtension(sourceFile));
targetFilePath.append(".mp4");
- final File targetFile = new File(targetFilePath.toString());
- return targetFile;
+ return new File(targetFilePath.toString());
}
@Override
}
@Override
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/AbstractIndexer.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/AbstractIndexer.java
index
2394ece
..
5036721
100644
(file)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/AbstractIndexer.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/AbstractIndexer.java
@@
-23,7
+23,7
@@
public abstract class AbstractIndexer {
return fileExtension.equalsIgnoreCase("ogv");
}
return fileExtension.equalsIgnoreCase("ogv");
}
-
public
static boolean shallFileBeIndexed(final File file) {
+ static boolean shallFileBeIndexed(final File file) {
if (file.getName().startsWith("."))
return false;
if (file.getName().startsWith("."))
return false;
@@
-34,8
+34,8
@@
public abstract class AbstractIndexer {
return true;
}
return true;
}
-
public
void compileHtml(final Layout layout,
-
final DirectoryMetadata directory)
+ void compileHtml(final Layout layout,
+ final DirectoryMetadata directory)
throws UnsupportedEncodingException {
for (final AbstractFile file : directory.getFiles())
throws UnsupportedEncodingException {
for (final AbstractFile file : directory.getFiles())
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/CommandlineHandler.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/CommandlineHandler.java
index
d45bc84
..
497b5b3
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/CommandlineHandler.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/CommandlineHandler.java
@@
-17,23
+17,20
@@
import eu.svjatoslav.meviz.encoder.EncodingOptions;
import java.io.File;
import java.io.File;
-
public
class CommandlineHandler {
+class CommandlineHandler {
- Parser parser = new Parser();
-
- StringParameter galleryNameParameter = parser.add(
+ final Parser parser = new Parser();
+ final NullParameter removeIndex = parser.add(
+ new NullParameter("Remove generated index")).addAliases("-r",
+ "--remove");
+ private final StringParameter galleryNameParameter = parser.add(
new StringParameter("Gallery title. (default is: "
+ Constants.DEFAULT_GALLERY_TITLE + ").")).addAliases("-t",
"--gallery-title");
new StringParameter("Gallery title. (default is: "
+ Constants.DEFAULT_GALLERY_TITLE + ").")).addAliases("-t",
"--gallery-title");
-
- DirectoryParameter workingDirectoryParameter = parser
+ private final DirectoryParameter workingDirectoryParameter = parser
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
- NullParameter removeIndex = parser.add(
- new NullParameter("Remove generated index")).addAliases("-r",
- "--remove");
-
public String getGalleryTitle() {
if (galleryNameParameter.isParameterSpecified())
return galleryNameParameter.getValue();
public String getGalleryTitle() {
if (galleryNameParameter.isParameterSpecified())
return galleryNameParameter.getValue();
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexRemover.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexRemover.java
index
0b3b816
..
30f1099
100644
(file)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexRemover.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexRemover.java
@@
-5,7
+5,7
@@
import eu.svjatoslav.commons.file.IOHelper;
import java.io.File;
import java.io.IOException;
import java.io.File;
import java.io.IOException;
-
public
class FilesystemIndexRemover {
+class FilesystemIndexRemover {
private final CommandlineHandler commandlineHandler;
private final CommandlineHandler commandlineHandler;
@@
-16,7
+16,7
@@
public class FilesystemIndexRemover {
removeIndex(commandlineHandler.getWorkingDirectory());
}
removeIndex(commandlineHandler.getWorkingDirectory());
}
- p
ublic
void removeIndex(final File workingDirectory) throws IOException {
+ p
rivate
void removeIndex(final File workingDirectory) throws IOException {
// remove thumbnails directory from current directory
final File thumbnailsDirectory = Utils
// remove thumbnails directory from current directory
final File thumbnailsDirectory = Utils
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexer.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexer.java
index
86ad818
..
6aa927c
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexer.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/FilesystemIndexer.java
@@
-29,10
+29,10
@@
import java.util.List;
public class FilesystemIndexer extends AbstractIndexer {
public class FilesystemIndexer extends AbstractIndexer {
- p
ublic
static final Logger logger = Logger
+ p
rivate
static final Logger logger = Logger
.getLogger(FilesystemIndexer.class);
.getLogger(FilesystemIndexer.class);
- private final HashSet<String> validMetadataFiles = new HashSet<
String
>();
+ private final HashSet<String> validMetadataFiles = new HashSet<>();
private final File directoryToIndex;
private final List<String> pathElements;
private final File directoryToIndex;
private final List<String> pathElements;
@@
-73,14
+73,14
@@
public class FilesystemIndexer extends AbstractIndexer {
}
}
- p
ublic
boolean canWriteIndexFile(final File indexFile)
+ p
rivate
boolean canWriteIndexFile(final File indexFile)
throws IOException {
return !indexFile.exists() || Utils.isMevizGeneratedIndexFile(indexFile);
}
throws IOException {
return !indexFile.exists() || Utils.isMevizGeneratedIndexFile(indexFile);
}
- p
ublic
void generateHtmlFromMetadata(final HashSet<Layout> layouts) {
+ p
rivate
void generateHtmlFromMetadata(final HashSet<Layout> layouts) {
// Generate HTML from metadata
for (final Layout layout : layouts)
try {
// Generate HTML from metadata
for (final Layout layout : layouts)
try {
@@
-99,9
+99,9
@@
public class FilesystemIndexer extends AbstractIndexer {
}
}
}
}
- p
ublic
List<String> getChildPath(final File file) {
+ p
rivate
List<String> getChildPath(final File file) {
- final List<String> result = new ArrayList<
String
>();
+ final List<String> result = new ArrayList<>();
result.addAll(pathElements);
result.add(file.getName());
result.addAll(pathElements);
result.add(file.getName());
@@
-149,7
+149,7
@@
public class FilesystemIndexer extends AbstractIndexer {
+ Utils.urlEncode(thumbnailFileName);
}
+ Utils.urlEncode(thumbnailFileName);
}
- p
ublic
void initializeLayouts() {
+ p
rivate
void initializeLayouts() {
layouts = Utils.getLayouts();
layouts = Utils.getLayouts();
@@
-160,7
+160,7
@@
public class FilesystemIndexer extends AbstractIndexer {
"", "."));
}
"", "."));
}
- p
ublic
void initializeThumbnailsDirectory() {
+ p
rivate
void initializeThumbnailsDirectory() {
final File thumbnailsDirectory = Utils
.getThumbnailsDirectory(directoryToIndex);
final File thumbnailsDirectory = Utils
.getThumbnailsDirectory(directoryToIndex);
@@
-168,7
+168,7
@@
public class FilesystemIndexer extends AbstractIndexer {
thumbnailsDirectory.mkdirs();
}
thumbnailsDirectory.mkdirs();
}
- p
ublic
void loadOrCreateMetadata() {
+ p
rivate
void loadOrCreateMetadata() {
metadataFile = new File(
Utils.getThumbnailsDirectoryPath(directoryToIndex)
metadataFile = new File(
Utils.getThumbnailsDirectoryPath(directoryToIndex)
@@
-186,7
+186,7
@@
public class FilesystemIndexer extends AbstractIndexer {
}
}
- p
ublic
void updateMetadata() throws Exception {
+ p
rivate
void updateMetadata() throws Exception {
for (final File file : directoryToIndex.listFiles())
if (shallFileBeIndexed(file)) {
for (final File file : directoryToIndex.listFiles())
if (shallFileBeIndexed(file)) {
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/ImageFormatError.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/ImageFormatError.java
index
7d40bf4
..
c2089a1
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/ImageFormatError.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/ImageFormatError.java
@@
-9,7
+9,7
@@
package eu.svjatoslav.meviz.htmlindexer;
package eu.svjatoslav.meviz.htmlindexer;
-
public
class ImageFormatError extends Exception {
+class ImageFormatError extends Exception {
private static final long serialVersionUID = 4037233564457071385L;
private static final long serialVersionUID = 4037233564457071385L;
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/IndexingContext.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/IndexingContext.java
index
2ec1bed
..
585f934
100644
(file)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/IndexingContext.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/IndexingContext.java
@@
-19,7
+19,7
@@
public class IndexingContext {
public List<String> getLocalPathComponents() {
public List<String> getLocalPathComponents() {
- final List<String> result = new ArrayList<
String
>();
+ final List<String> result = new ArrayList<>();
final String[] strings = localUrl.split("/");
final String[] strings = localUrl.split("/");
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/Layout.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/Layout.java
index
f9e0982
..
f434f92
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/Layout.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/Layout.java
@@
-51,7
+51,7
@@
public interface Layout {
*/
void enlistOgv(AbstractFile file,
DirectoryMetadata parentDirectoryMetadata)
*/
void enlistOgv(AbstractFile file,
DirectoryMetadata parentDirectoryMetadata)
-
throws UnsupportedEncodingException
;
+ ;
/**
* Return layout specific suffix that will be appended between
/**
* Return layout specific suffix that will be appended between
@@
-68,7
+68,7
@@
public interface Layout {
*/
String getHtml(final boolean showTitle,
final boolean doHtmlHeaderAndFooter, DirectoryMetadata metadata)
*/
String getHtml(final boolean showTitle,
final boolean doHtmlHeaderAndFooter, DirectoryMetadata metadata)
-
throws IOException
;
+ ;
/**
* Initialize layout for particular directory.
/**
* Initialize layout for particular directory.
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/Main.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/Main.java
index
77eb377
..
f524490
100644
(file)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/Main.java
@@
-6,7
+6,7
@@
import java.util.ArrayList;
public class Main implements Module {
public class Main implements Module {
- CommandlineHandler commandlineHandler = new CommandlineHandler();
+
private final
CommandlineHandler commandlineHandler = new CommandlineHandler();
/**
* {@inheritDoc}
/**
* {@inheritDoc}
@@
-35,7
+35,7
@@
public class Main implements Module {
new FilesystemIndexRemover(commandlineHandler);
else
new FilesystemIndexer(commandlineHandler.getWorkingDirectory(),
new FilesystemIndexRemover(commandlineHandler);
else
new FilesystemIndexer(commandlineHandler.getWorkingDirectory(),
- commandlineHandler, new ArrayList<
String
>());
+ commandlineHandler, new ArrayList<>());
}
}
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/Utils.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/Utils.java
index
028995b
..
69c1c43
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/Utils.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/Utils.java
@@
-60,7
+60,7
@@
public class Utils {
}
public static HashSet<Layout> getLayouts() {
}
public static HashSet<Layout> getLayouts() {
- final HashSet<Layout> layouts = new HashSet<
Layout
>();
+ final HashSet<Layout> layouts = new HashSet<>();
layouts.add(new MixedLayout());
return layouts;
}
layouts.add(new MixedLayout());
return layouts;
}
@@
-76,13
+76,9
@@
public class Utils {
crc.update(b);
// note use crc.value, not crc.getValue()
crc.update(b);
// note use crc.value, not crc.getValue()
- final String hex = Integer.toHexString((int) crc.getValue())
- .toUpperCase();
-
- // System.out.println("Input string: " + input);
- // System.out.println("Result: " + hex);
- return hex;
+ return Integer.toHexString((int) crc.getValue())
+ .toUpperCase();
}
public static File getThumbnailsDirectory(final File directoryToIndex) {
}
public static File getThumbnailsDirectory(final File directoryToIndex) {
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java
index
dd52973
..
beaea50
100644
(file)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java
@@
-65,7
+65,7
@@
public class WebIndexer extends AbstractIndexer {
return layout.getHtml(false, false, directory);
}
return layout.getHtml(false, false, directory);
}
- p
ublic
DirectoryMetadata getMetadataForPath(final String requestPath)
+ p
rivate
DirectoryMetadata getMetadataForPath(final String requestPath)
throws ClassNotFoundException, IOException {
final String urlString = globalPrefix +
throws ClassNotFoundException, IOException {
final String urlString = globalPrefix +
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java
index
ebc5ca2
..
aae1a19
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java
@@
-19,22
+19,21
@@
import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Picture;
import org.apache.log4j.Logger;
import java.io.IOException;
import org.apache.log4j.Logger;
import java.io.IOException;
-import java.io.UnsupportedEncodingException;
import java.util.List;
public class MixedLayout implements Layout {
public static final String encoding = "UTF-8";
import java.util.List;
public class MixedLayout implements Layout {
public static final String encoding = "UTF-8";
- Logger logger = Logger.getLogger(MixedLayout.class);
+
private final
Logger logger = Logger.getLogger(MixedLayout.class);
- StringBuffer dirHtml = new StringBuffer();
+
private
StringBuffer dirHtml = new StringBuffer();
- StringBuffer filesHtml = new StringBuffer();
+
private
StringBuffer filesHtml = new StringBuffer();
- String galleryTitle;
+
private
String galleryTitle;
- List<String> path;
+
private
List<String> path;
private AbstractIndexer indexer;
private AbstractIndexer indexer;
@@
-132,8
+131,7
@@
public class MixedLayout implements Layout {
*/
@Override
public void enlistOgv(final AbstractFile abstractFile,
*/
@Override
public void enlistOgv(final AbstractFile abstractFile,
- final DirectoryMetadata parentDirectoryMetadata)
- throws UnsupportedEncodingException {
+ final DirectoryMetadata parentDirectoryMetadata) {
final GeneralFile file = (GeneralFile) abstractFile;
final GeneralFile file = (GeneralFile) abstractFile;
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/Dimension.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/Dimension.java
index
db51f50
..
5c144f4
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/Dimension.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/Dimension.java
@@
-22,7
+22,7
@@
public class Dimension implements Serializable, Comparable<Dimension> {
public int width;
public int height;
public int width;
public int height;
- p
ublic
Dimension() {
+ p
rivate
Dimension() {
width = 0;
height = 0;
}
width = 0;
height = 0;
}
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/DirectoryMetadata.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/DirectoryMetadata.java
index
0dcdf12
..
600d65c
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/DirectoryMetadata.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/DirectoryMetadata.java
@@
-12,11
+12,9
@@
package eu.svjatoslav.meviz.htmlindexer.metadata;
import eu.svjatoslav.commons.file.FilePathParser;
import eu.svjatoslav.meviz.htmlindexer.AbstractIndexer;
import eu.svjatoslav.meviz.htmlindexer.FileSortComparator;
import eu.svjatoslav.commons.file.FilePathParser;
import eu.svjatoslav.meviz.htmlindexer.AbstractIndexer;
import eu.svjatoslav.meviz.htmlindexer.FileSortComparator;
-import eu.svjatoslav.meviz.htmlindexer.ImageFormatError;
import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.*;
import java.io.File;
import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.*;
import java.io.File;
-import java.io.IOException;
import java.io.Serializable;
import java.util.*;
import java.io.Serializable;
import java.util.*;
@@
-27,7
+25,7
@@
public class DirectoryMetadata implements Serializable {
private static final long serialVersionUID = 3526489102725366334L;
private static final long serialVersionUID = 3526489102725366334L;
- private final HashMap<String, AbstractFile> fileNameToFileMap = new HashMap<
String, AbstractFile
>();
+ private final HashMap<String, AbstractFile> fileNameToFileMap = new HashMap<>();
public transient boolean changed;
public transient boolean changed;
@@
-89,13
+87,13
@@
public class DirectoryMetadata implements Serializable {
return new GeneralFile(parentDirectory, fileName);
}
return new GeneralFile(parentDirectory, fileName);
}
- p
ublic
AbstractFile getFile(final String fileName) {
+ p
rivate
AbstractFile getFile(final String fileName) {
return fileNameToFileMap.get(fileName);
}
public Collection<AbstractFile> getFiles() {
return fileNameToFileMap.get(fileName);
}
public Collection<AbstractFile> getFiles() {
- final ArrayList<AbstractFile> files = new ArrayList<
AbstractFile
>(
+ final ArrayList<AbstractFile> files = new ArrayList<>(
fileNameToFileMap.values());
Collections.sort(files, new FileSortComparator());
fileNameToFileMap.values());
Collections.sort(files, new FileSortComparator());
@@
-112,13
+110,12
@@
public class DirectoryMetadata implements Serializable {
return mevizSpecialFile.getFileContent();
}
return mevizSpecialFile.getFileContent();
}
- public Dimension getImageDimensions(final String fileName)
- throws IOException, ImageFormatError {
+ public Dimension getImageDimensions(final String fileName) {
return ((Picture) getFile(fileName)).getDimensions();
}
return ((Picture) getFile(fileName)).getDimensions();
}
- p
ublic
AbstractFile registerFile(final File parentDirectory, final File file)
+ p
rivate
AbstractFile registerFile(final File parentDirectory, final File file)
throws Exception {
final String fileName = file.getName();
throws Exception {
final String fileName = file.getName();
@@
-135,11
+132,10
@@
public class DirectoryMetadata implements Serializable {
public void removeUnusedMetadataEntries() {
public void removeUnusedMetadataEntries() {
- for (final String key : new HashSet<String>(fileNameToFileMap.keySet()))
- if (!fileNameToFileMap.get(key).isMetaInfoVerified()) {
- fileNameToFileMap.remove(key);
- changed = true;
- }
+ new HashSet<>(fileNameToFileMap.keySet()).stream().filter(key -> !fileNameToFileMap.get(key).isMetaInfoVerified()).forEach(key -> {
+ fileNameToFileMap.remove(key);
+ changed = true;
+ });
}
}
}
}
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/MetadadaHelper.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/MetadadaHelper.java
index
0013d1c
..
3e75939
100644
(file)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/MetadadaHelper.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/MetadadaHelper.java
@@
-16,7
+16,7
@@
import java.io.*;
public class MetadadaHelper {
public class MetadadaHelper {
- p
ublic
static final Logger logger = Logger.getLogger(MetadadaHelper.class);
+ p
rivate
static final Logger logger = Logger.getLogger(MetadadaHelper.class);
/**
* Load previously generated or initialize new directory metadata.
/**
* Load previously generated or initialize new directory metadata.
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/AbstractFile.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/AbstractFile.java
index
9c35a32
..
7662093
100644
(file)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/AbstractFile.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/AbstractFile.java
@@
-3,7
+3,6
@@
package eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes;
import eu.svjatoslav.commons.file.FilePathParser;
import java.io.File;
import eu.svjatoslav.commons.file.FilePathParser;
import java.io.File;
-import java.io.IOException;
import java.io.Serializable;
public abstract class AbstractFile implements Serializable {
import java.io.Serializable;
public abstract class AbstractFile implements Serializable {
@@
-22,7
+21,7
@@
public abstract class AbstractFile implements Serializable {
private transient boolean metaInfoVerified;
private transient boolean metaInfoVerified;
-
public
AbstractFile(final File parentDirectory, final String fileName)
+ AbstractFile(final File parentDirectory, final String fileName)
throws Exception {
this.fileName = fileName;
ensureFileMetainfoIsUpToDate(parentDirectory);
throws Exception {
this.fileName = fileName;
ensureFileMetainfoIsUpToDate(parentDirectory);
@@
-46,7
+45,7
@@
public abstract class AbstractFile implements Serializable {
return getFile(parentDirectory).exists();
}
return getFile(parentDirectory).exists();
}
-
public
File getFile(final File parentDirectory) {
+ File getFile(final File parentDirectory) {
return new File(parentDirectory.getAbsolutePath(), fileName);
}
return new File(parentDirectory.getAbsolutePath(), fileName);
}
@@
-58,8
+57,7
@@
public abstract class AbstractFile implements Serializable {
return fileLength;
}
return fileLength;
}
- private boolean isMetainfoUpToDate(final java.io.File parentDirectory)
- throws IOException {
+ private boolean isMetainfoUpToDate(final java.io.File parentDirectory) {
if (metaInfoVerified)
return true;
if (metaInfoVerified)
return true;
diff --git
a/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java
b/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java
index
7ed4d09
..
4c3aee7
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java
+++ b/
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java
@@
-53,7
+53,7
@@
public class Picture extends AbstractFile {
* exceeding provided thumbnail width and height, and preserving aspect
* ratio of original image.
*/
* exceeding provided thumbnail width and height, and preserving aspect
* ratio of original image.
*/
- p
ublic
static java.awt.Dimension getTargetThumbnailDimension(
+ p
rivate
static java.awt.Dimension getTargetThumbnailDimension(
final java.awt.Dimension originalImageDimension,
final java.awt.Dimension desiredTargetDimension) {
final java.awt.Dimension originalImageDimension,
final java.awt.Dimension desiredTargetDimension) {
@@
-87,7
+87,7
@@
public class Picture extends AbstractFile {
* Propose list of thumbnail dimensions.
*/
public static List<Dimension> getThumbnailDimensions(Dimension current) {
* Propose list of thumbnail dimensions.
*/
public static List<Dimension> getThumbnailDimensions(Dimension current) {
- final ArrayList<Dimension> result = new ArrayList<
Dimension
>();
+ final ArrayList<Dimension> result = new ArrayList<>();
result.add(current);
while (current.getArea() > 1000000) {
result.add(current);
while (current.getArea() > 1000000) {
@@
-138,8
+138,8
@@
public class Picture extends AbstractFile {
/**
* @return new image scaled to desired dimensions
*/
/**
* @return new image scaled to desired dimensions
*/
- p
ublic
static Image scaleImage(final Image srcImage, final int width,
- final int height) {
+ p
rivate
static Image scaleImage(final Image srcImage, final int width,
+
final int height) {
final ImageFilter filter = new java.awt.image.AreaAveragingScaleFilter(
width, height);
final ImageFilter filter = new java.awt.image.AreaAveragingScaleFilter(
width, height);
diff --git
a/src/main/java/eu/svjatoslav/meviz/renamer/CommandlineHandler.java
b/src/main/java/eu/svjatoslav/meviz/renamer/CommandlineHandler.java
index
708cf16
..
ec49573
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/renamer/CommandlineHandler.java
+++ b/
src/main/java/eu/svjatoslav/meviz/renamer/CommandlineHandler.java
@@
-18,28
+18,28
@@
import eu.svjatoslav.meviz.encoder.EncodingOptions;
import java.io.File;
import java.io.File;
-
public
class CommandlineHandler {
+class CommandlineHandler {
- Parser parser = new Parser();
+
final
Parser parser = new Parser();
- NullParameter recursiveParameter = parser.add(
+
private final
NullParameter recursiveParameter = parser.add(
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
- NullParameter testParameter = parser.add(
+
private final
NullParameter testParameter = parser.add(
new NullParameter(
"Simulate renaming (no changes will be actually done)."))
.addAliases("-t", "--test");
new NullParameter(
"Simulate renaming (no changes will be actually done)."))
.addAliases("-t", "--test");
- StringParameter outputPatternParameter = parser.add(
+
private final
StringParameter outputPatternParameter = parser.add(
new StringParameter("Output pattern.")).addAliases("-o",
"--output-pattern");
new StringParameter("Output pattern.")).addAliases("-o",
"--output-pattern");
- StringParameters inputPatternParameter = parser.add(
+
private final
StringParameters inputPatternParameter = parser.add(
new StringParameters("File input pattern.")).addAliases("-i",
"--input-pattern");
new StringParameters("File input pattern.")).addAliases("-i",
"--input-pattern");
- DirectoryParameter workingDirectoryParameter = parser
+
private final
DirectoryParameter workingDirectoryParameter = parser
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
diff --git
a/src/main/java/eu/svjatoslav/meviz/renamer/Main.java
b/src/main/java/eu/svjatoslav/meviz/renamer/Main.java
index
6495e0f
..
073898e
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/renamer/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/renamer/Main.java
@@
-17,16
+17,16
@@
import java.util.Arrays;
public class Main implements Module {
public class Main implements Module {
- p
ublic int processedFilesCount
;
-
CommandlineHandler commandlineHandler = new CommandlineHandler()
;
- RenamingOptions options;
+ p
rivate final CommandlineHandler commandlineHandler = new CommandlineHandler()
;
+
private int processedFilesCount
;
+
private
RenamingOptions options;
/**
* Verify that program has enough information to start executing
*
* @return true if all is ok, false if errors were found
*/
/**
* Verify that program has enough information to start executing
*
* @return true if all is ok, false if errors were found
*/
- p
ublic
boolean checkThatThereIsEnoughDataToProceed() {
+ p
rivate
boolean checkThatThereIsEnoughDataToProceed() {
if (options.inputPatterns.size() == 0) {
System.out.println("Error: no input patterns given.");
return false;
if (options.inputPatterns.size() == 0) {
System.out.println("Error: no input patterns given.");
return false;
@@
-40,7
+40,7
@@
public class Main implements Module {
return true;
}
return true;
}
- p
ublic
boolean fileMatchesInputPattern(final File file) {
+ p
rivate
boolean fileMatchesInputPattern(final File file) {
final String fileName = file.getName();
for (final String inputPattern : options.inputPatterns)
final String fileName = file.getName();
for (final String inputPattern : options.inputPatterns)
@@
-119,7
+119,7
@@
public class Main implements Module {
}
}
}
}
- p
ublic
void processFileOrDirectory(final File file) {
+ p
rivate
void processFileOrDirectory(final File file) {
if (!file.exists()) {
System.out.println("Error: file \"" + file.getAbsolutePath()
+ "\" does not exist.");
if (!file.exists()) {
System.out.println("Error: file \"" + file.getAbsolutePath()
+ "\" does not exist.");
@@
-134,7
+134,7
@@
public class Main implements Module {
}
}
- p
ublic
void rename() {
+ p
rivate
void rename() {
processFileOrDirectory(options.targetDirectory);
}
processFileOrDirectory(options.targetDirectory);
}
diff --git
a/src/main/java/eu/svjatoslav/meviz/renamer/RenamingOptions.java
b/src/main/java/eu/svjatoslav/meviz/renamer/RenamingOptions.java
index
a9a1c04
..
5670c8e
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/renamer/RenamingOptions.java
+++ b/
src/main/java/eu/svjatoslav/meviz/renamer/RenamingOptions.java
@@
-14,7
+14,7
@@
import java.util.ArrayList;
public class RenamingOptions {
public class RenamingOptions {
- public
ArrayList<String> inputPatterns = new ArrayList<String
>();
+ public
final ArrayList<String> inputPatterns = new ArrayList<
>();
public boolean recursive = false;
public boolean recursive = false;
diff --git
a/src/main/java/eu/svjatoslav/meviz/replace/CommandlineHandler.java
b/src/main/java/eu/svjatoslav/meviz/replace/CommandlineHandler.java
index
d8147a1
..
5c6d44b
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/replace/CommandlineHandler.java
+++ b/
src/main/java/eu/svjatoslav/meviz/replace/CommandlineHandler.java
@@
-16,23
+16,23
@@
import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParamet
import java.io.File;
import java.io.File;
-
public
class CommandlineHandler {
+class CommandlineHandler {
- Parser parser = new Parser();
+
final
Parser parser = new Parser();
- NullParameter recursiveParameter = parser.add(
+
private final
NullParameter recursiveParameter = parser.add(
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
- StringParameter searchForPattern = parser
+
private final
StringParameter searchForPattern = parser
.add(new StringParameter("String to search for"))
.addAliases("-s", "--search-pattern").setMandatory();
.add(new StringParameter("String to search for"))
.addAliases("-s", "--search-pattern").setMandatory();
- StringParameter replaceWithPattern = parser.add(
+
private final
StringParameter replaceWithPattern = parser.add(
new StringParameter("String to place instead")).addAliases("-p",
"--replace-pattern");
new StringParameter("String to place instead")).addAliases("-p",
"--replace-pattern");
- DirectoryParameter directoryParameter = parser
+
private final
DirectoryParameter directoryParameter = parser
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
.add(new DirectoryParameter("Working directory."))
.addAliases("-w", "--working-directory").mustExist();
diff --git
a/src/main/java/eu/svjatoslav/meviz/replace/Main.java
b/src/main/java/eu/svjatoslav/meviz/replace/Main.java
index
3f42a9a
..
64c47d7
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/replace/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/replace/Main.java
@@
-15,9
+15,9
@@
import java.io.*;
public class Main implements Module {
public class Main implements Module {
- CommandlineHandler commandlineHandler = new CommandlineHandler();
+
private final
CommandlineHandler commandlineHandler = new CommandlineHandler();
- CommandlineOptions options;
+
private
CommandlineOptions options;
@Override
public String getDescription() {
@Override
public String getDescription() {
@@
-29,7
+29,7
@@
public class Main implements Module {
return "replace";
}
return "replace";
}
- p
ublic
void processDirectory(final File directory) {
+ p
rivate
void processDirectory(final File directory) {
for (final File file : directory.listFiles())
if (file.isDirectory()) {
for (final File file : directory.listFiles())
if (file.isDirectory()) {
@@
-47,7
+47,7
@@
public class Main implements Module {
}
}
- p
ublic
void processFile(final File file) throws IOException {
+ p
rivate
void processFile(final File file) throws IOException {
final FileReader fileReader = new FileReader(file);
final BufferedReader bufferedReader = new BufferedReader(fileReader);
final FileReader fileReader = new FileReader(file);
final BufferedReader bufferedReader = new BufferedReader(fileReader);
diff --git
a/src/main/java/eu/svjatoslav/meviz/textsplitter/CommandlineHandler.java
b/src/main/java/eu/svjatoslav/meviz/textsplitter/CommandlineHandler.java
index
322d56c
..
a07d10c
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/textsplitter/CommandlineHandler.java
+++ b/
src/main/java/eu/svjatoslav/meviz/textsplitter/CommandlineHandler.java
@@
-16,23
+16,23
@@
import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParamet
import java.io.File;
import java.io.File;
-
public
class CommandlineHandler {
+class CommandlineHandler {
- Parser parser = new Parser();
+
final
Parser parser = new Parser();
- NullParameter recursiveParameter = parser.add(
+
private final
NullParameter recursiveParameter = parser.add(
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
- StringParameters fileInputPatternsParameter = parser.add(
+
private final
StringParameters fileInputPatternsParameter = parser.add(
new StringParameters("File input pattern.").addAliases("-i",
"--input-pattern")).setMandatory();
new StringParameters("File input pattern.").addAliases("-i",
"--input-pattern")).setMandatory();
- StringParameters splitPatternsParameter = parser
+
private final
StringParameters splitPatternsParameter = parser
.add(new StringParameters("File split regular expression."))
.addAliases("-s", "--split-pattern").setMandatory();
.add(new StringParameters("File split regular expression."))
.addAliases("-s", "--split-pattern").setMandatory();
- DirectoryParameter workingDirectoryParameter = parser.add(
+
private final
DirectoryParameter workingDirectoryParameter = parser.add(
new DirectoryParameter("Working directory.")).addAliases("-w",
"--working-directory");
new DirectoryParameter("Working directory.")).addAliases("-w",
"--working-directory");
diff --git
a/src/main/java/eu/svjatoslav/meviz/textsplitter/Main.java
b/src/main/java/eu/svjatoslav/meviz/textsplitter/Main.java
index
aaaecde
..
cad3b05
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/textsplitter/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/textsplitter/Main.java
@@
-18,11
+18,11
@@
import java.io.*;
public class Main implements Module {
public class Main implements Module {
- CommandlineHandler commandlineHandler = new CommandlineHandler();
+
private final
CommandlineHandler commandlineHandler = new CommandlineHandler();
- TextSplittingOptions options;
+
private
TextSplittingOptions options;
- p
ublic
boolean fileMatchesInputPattern(final File file) {
+ p
rivate
boolean fileMatchesInputPattern(final File file) {
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : options.fileInputPatterns)
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : options.fileInputPatterns)
@@
-62,7
+62,7
@@
public class Main implements Module {
return new File(targetFilePath.toString());
}
return new File(targetFilePath.toString());
}
- p
ublic
void processDirectory(final File directory) {
+ p
rivate
void processDirectory(final File directory) {
for (final File subFile : directory.listFiles())
if (subFile.isDirectory()) {
for (final File subFile : directory.listFiles())
if (subFile.isDirectory()) {
@@
-80,7
+80,7
@@
public class Main implements Module {
}
}
- p
ublic
void processFile(final File file) throws IOException {
+ p
rivate
void processFile(final File file) throws IOException {
final File targetFile = getTargetFile(file);
final BufferedReader bufferedReader = new BufferedReader(
final File targetFile = getTargetFile(file);
final BufferedReader bufferedReader = new BufferedReader(
diff --git
a/src/main/java/eu/svjatoslav/meviz/textsplitter/TextSplittingOptions.java
b/src/main/java/eu/svjatoslav/meviz/textsplitter/TextSplittingOptions.java
index
0f0cd42
..
33365bc
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/textsplitter/TextSplittingOptions.java
+++ b/
src/main/java/eu/svjatoslav/meviz/textsplitter/TextSplittingOptions.java
@@
-14,9
+14,9
@@
import java.util.ArrayList;
public class TextSplittingOptions {
public class TextSplittingOptions {
- public
ArrayList<String> fileInputPatterns = new ArrayList<String
>();
+ public
final ArrayList<String> fileInputPatterns = new ArrayList<
>();
- public
ArrayList<String> textSplitPatterns = new ArrayList<String
>();
+ public
final ArrayList<String> textSplitPatterns = new ArrayList<
>();
public boolean recursive = false;
public boolean recursive = false;
diff --git
a/src/main/java/eu/svjatoslav/meviz/texttruncate/CommandlineHandler.java
b/src/main/java/eu/svjatoslav/meviz/texttruncate/CommandlineHandler.java
index
dc294d6
..
5d657e5
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/texttruncate/CommandlineHandler.java
+++ b/
src/main/java/eu/svjatoslav/meviz/texttruncate/CommandlineHandler.java
@@
-16,19
+16,19
@@
import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParamet
import java.io.File;
import java.io.File;
-
public
class CommandlineHandler {
+class CommandlineHandler {
- Parser parser = new Parser();
+
final
Parser parser = new Parser();
- NullParameter recursiveParameter = parser.add(
+
private final
NullParameter recursiveParameter = parser.add(
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
new NullParameter("Enable recursive mode.")).addAliases("-r",
"--recursive");
- StringParameters inputPatternParameter = parser.add(
+
private final
StringParameters inputPatternParameter = parser.add(
new StringParameters("File input pattern.")).addAliases("-i",
"--input-pattern");
new StringParameters("File input pattern.")).addAliases("-i",
"--input-pattern");
- DirectoryParameter workingDirectoryParameter = parser.add(
+
private final
DirectoryParameter workingDirectoryParameter = parser.add(
new DirectoryParameter("Working directory.")).addAliases("-w",
"--working-directory");
new DirectoryParameter("Working directory.")).addAliases("-w",
"--working-directory");
diff --git
a/src/main/java/eu/svjatoslav/meviz/texttruncate/Main.java
b/src/main/java/eu/svjatoslav/meviz/texttruncate/Main.java
index
4dfd1af
..
63d0ad0
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/texttruncate/Main.java
+++ b/
src/main/java/eu/svjatoslav/meviz/texttruncate/Main.java
@@
-18,17
+18,17
@@
import java.io.*;
public class Main implements Module {
public class Main implements Module {
- p
ublic
static final int targetLineLength = 200;
+ p
rivate
static final int targetLineLength = 200;
- p
ublic
static final int maxSplittedLines = 3;
+ p
rivate
static final int maxSplittedLines = 3;
- p
ublic
static final String splitLinePrefix = " ";
+ p
rivate
static final String splitLinePrefix = " ";
- CommandlineHandler commandlineHandler = new CommandlineHandler();
+
private final
CommandlineHandler commandlineHandler = new CommandlineHandler();
- TextTruncatingOptions options;
+
private
TextTruncatingOptions options;
- p
ublic
boolean fileMatchesInputPattern(final File file) {
+ p
rivate
boolean fileMatchesInputPattern(final File file) {
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : options.inputPatterns)
final String fileName = file.getName().toLowerCase();
for (final String inputPattern : options.inputPatterns)
@@
-68,7
+68,7
@@
public class Main implements Module {
return new File(targetFilePath.toString());
}
return new File(targetFilePath.toString());
}
- p
ublic
void processDirectory(final File directory) {
+ p
rivate
void processDirectory(final File directory) {
for (final File subFile : directory.listFiles())
if (subFile.isDirectory()) {
for (final File subFile : directory.listFiles())
if (subFile.isDirectory()) {
@@
-86,7
+86,7
@@
public class Main implements Module {
}
}
- p
ublic
void processFile(final File file) throws IOException {
+ p
rivate
void processFile(final File file) throws IOException {
final File targetFile = getTargetFile(file);
final BufferedReader bufferedReader = new BufferedReader(
final File targetFile = getTargetFile(file);
final BufferedReader bufferedReader = new BufferedReader(
diff --git
a/src/main/java/eu/svjatoslav/meviz/texttruncate/TextTruncatingOptions.java
b/src/main/java/eu/svjatoslav/meviz/texttruncate/TextTruncatingOptions.java
index
229443c
..
563754e
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/meviz/texttruncate/TextTruncatingOptions.java
+++ b/
src/main/java/eu/svjatoslav/meviz/texttruncate/TextTruncatingOptions.java
@@
-14,7
+14,7
@@
import java.util.ArrayList;
public class TextTruncatingOptions {
public class TextTruncatingOptions {
- public
ArrayList<String> inputPatterns = new ArrayList<String
>();
+ public
final ArrayList<String> inputPatterns = new ArrayList<
>();
public boolean recursive = false;
public boolean recursive = false;