From 85b485359fd98ffb8dabe84cf0c70c1016eff0e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Mon, 13 Apr 2020 15:03:32 +0200 Subject: [PATCH] Consistent EOL format. --- .../android/dictionary/DateFormatTest.java | 58 ++++---- .../dictionary/SerializeCollatorTest.java | 70 ++++----- src/com/hughes/util/FileUtil.java | 134 +++++++++--------- 3 files changed, 131 insertions(+), 131 deletions(-) diff --git a/src/com/hughes/android/dictionary/DateFormatTest.java b/src/com/hughes/android/dictionary/DateFormatTest.java index fce2095..8be638c 100644 --- a/src/com/hughes/android/dictionary/DateFormatTest.java +++ b/src/com/hughes/android/dictionary/DateFormatTest.java @@ -1,29 +1,29 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package com.hughes.android.dictionary; - -import java.text.SimpleDateFormat; -import java.util.Date; - -public class DateFormatTest { - - /** - * @param args - */ - public static void main(String[] args) { - System.out.println(new SimpleDateFormat("yyyy.MM.dd HH:mm:ss").format(new Date())); - } - -} +// Copyright 2011 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.hughes.android.dictionary; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class DateFormatTest { + + /** + * @param args + */ + public static void main(String[] args) { + System.out.println(new SimpleDateFormat("yyyy.MM.dd HH:mm:ss").format(new Date())); + } + +} diff --git a/src/com/hughes/android/dictionary/SerializeCollatorTest.java b/src/com/hughes/android/dictionary/SerializeCollatorTest.java index 66451ff..2980e10 100644 --- a/src/com/hughes/android/dictionary/SerializeCollatorTest.java +++ b/src/com/hughes/android/dictionary/SerializeCollatorTest.java @@ -1,35 +1,35 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package com.hughes.android.dictionary; - -import java.io.File; -import java.io.IOException; -import java.util.Comparator; - -import com.hughes.android.dictionary.engine.Language; - -public class SerializeCollatorTest { - - /** - * @param args - * @throws IOException - */ - public static void main(String[] args) throws IOException { - File temp = File.createTempFile("temp", null); - final Comparator c = Language.de.getCollator(); - //FileUtil.writeObject(c, temp); - } - -} +// Copyright 2011 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.hughes.android.dictionary; + +import java.io.File; +import java.io.IOException; +import java.util.Comparator; + +import com.hughes.android.dictionary.engine.Language; + +public class SerializeCollatorTest { + + /** + * @param args + * @throws IOException + */ + public static void main(String[] args) throws IOException { + File temp = File.createTempFile("temp", null); + final Comparator c = Language.de.getCollator(); + //FileUtil.writeObject(c, temp); + } + +} diff --git a/src/com/hughes/util/FileUtil.java b/src/com/hughes/util/FileUtil.java index d3024da..d280cc1 100644 --- a/src/com/hughes/util/FileUtil.java +++ b/src/com/hughes/util/FileUtil.java @@ -1,67 +1,67 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package com.hughes.util; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.io.RandomAccessFile; -import java.util.ArrayList; -import java.util.List; - -@SuppressWarnings("WeakerAccess") -public final class FileUtil { - public static String readLine(final RandomAccessFile file, final long startPos) throws IOException { - file.seek(startPos); - return file.readLine(); - } - - public static List readLines(final File file) throws IOException { - final List result = new ArrayList<>(); - try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file)))) { - String line; - while ((line = in.readLine()) != null) { - result.add(line); - } - } - return result; - } - - public static String readToString(final File file) throws IOException { - StringBuilder result = new StringBuilder(); - try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file)))) { - String line; - while ((line = in.readLine()) != null) { - result.append(line).append("\n"); - } - } - return result.toString(); - } - - public static void writeStringToUTF8File(final String string, final File file) { - throw new IllegalStateException(); - } - - public static void printString(final File file, final String s) throws IOException { - final PrintStream out = new PrintStream(new FileOutputStream(file)); - out.print(s); - out.close(); - } - -} +// Copyright 2011 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.hughes.util; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintStream; +import java.io.RandomAccessFile; +import java.util.ArrayList; +import java.util.List; + +@SuppressWarnings("WeakerAccess") +public final class FileUtil { + public static String readLine(final RandomAccessFile file, final long startPos) throws IOException { + file.seek(startPos); + return file.readLine(); + } + + public static List readLines(final File file) throws IOException { + final List result = new ArrayList<>(); + try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file)))) { + String line; + while ((line = in.readLine()) != null) { + result.add(line); + } + } + return result; + } + + public static String readToString(final File file) throws IOException { + StringBuilder result = new StringBuilder(); + try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file)))) { + String line; + while ((line = in.readLine()) != null) { + result.append(line).append("\n"); + } + } + return result.toString(); + } + + public static void writeStringToUTF8File(final String string, final File file) { + throw new IllegalStateException(); + } + + public static void printString(final File file, final String s) throws IOException { + final PrintStream out = new PrintStream(new FileOutputStream(file)); + out.print(s); + out.close(); + } + +} -- 2.43.0