├── .gitignore ├── .github └── funding.yml ├── offending_bom.txt ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.ui.prefs └── org.eclipse.jdt.core.prefs ├── .project ├── .classpath ├── LICENSE ├── example └── net │ └── pempek │ └── unicode │ └── UnicodeBOMInputStreamUsage.java ├── README.md ├── test └── net │ └── pempek │ └── unicode │ └── UnicodeBOMInputStreamTest.java └── src └── net └── pempek └── unicode └── UnicodeBOMInputStream.java /.gitignore: -------------------------------------------------------------------------------- 1 | /build.eclipse/ 2 | -------------------------------------------------------------------------------- /.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: gpakosz 2 | -------------------------------------------------------------------------------- /offending_bom.txt: -------------------------------------------------------------------------------- 1 | I contain an offending UTF-8 BOM 2 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_profile=_UnicodeBOMInputStream 3 | formatter_settings_version=12 4 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | UnicodeBOMInputStream 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | org.eclipse.jdt.core.javanature 14 | 15 | 16 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 3 | Version 2, December 2004 4 | 5 | Copyright (C) 2004 Sam Hocevar 6 | 7 | Everyone is permitted to copy and distribute verbatim or modified 8 | copies of this license document, and changing it is allowed as long 9 | as the name is changed. 10 | 11 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 12 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 13 | 14 | 0. You just DO WHAT THE FUCK YOU WANT TO. 15 | 1. Bla bla bla 16 | 2. Montesqieu et camembert, vive la France, zut alors! 17 | 18 | -------------------------------------------------------------------------------- 19 | 20 | WTFPLv2 is very permissive, see http://www.wtfpl.net/faq/ 21 | 22 | However, if this WTFPLV2 is REALLY a blocker and is the reason you can't use 23 | this project, contact me and I'll dual license it. 24 | 25 | -------------------------------------------------------------------------------- 26 | -------------------------------------------------------------------------------- /example/net/pempek/unicode/UnicodeBOMInputStreamUsage.java: -------------------------------------------------------------------------------- 1 | // (‑●‑●)> released under the WTFPL v2 license, by Gregory Pakosz (@gpakosz) 2 | 3 | package net.pempek.unicode; 4 | 5 | import java.io.BufferedReader; 6 | import java.io.FileInputStream; 7 | import java.io.InputStreamReader; 8 | import java.io.PrintStream; 9 | 10 | public final class UnicodeBOMInputStreamUsage 11 | { 12 | public static void main(final String[] args) throws Exception 13 | { 14 | // here we're setting the output encoding to US-ASCII on purpose 15 | // would you choose UTF-8, Java would read it with U+FEFF, see 16 | // http://www.fileformat.info/info/unicode/char/feff/ 17 | // 18 | // with US-ASCII, the BOM is replaced by ? 19 | PrintStream out = new PrintStream(System.out, true, "US-ASCII"); 20 | 21 | FileInputStream fis = new FileInputStream("offending_bom.txt"); 22 | UnicodeBOMInputStream ubis = new UnicodeBOMInputStream(fis); 23 | 24 | out.println("Detected BOM: " + ubis.getBOM()); 25 | 26 | out.print("Reading the content of the file without skipping the BOM: "); 27 | InputStreamReader isr = new InputStreamReader(ubis); 28 | BufferedReader br = new BufferedReader(isr); 29 | 30 | out.println(br.readLine()); 31 | 32 | br.close(); 33 | isr.close(); 34 | ubis.close(); 35 | fis.close(); 36 | 37 | fis = new FileInputStream("offending_bom.txt"); 38 | ubis = new UnicodeBOMInputStream(fis); 39 | ubis.skipBOM(); 40 | 41 | out.print("Reading the content of the file after skipping the BOM: "); 42 | isr = new InputStreamReader(ubis); 43 | br = new BufferedReader(isr); 44 | 45 | out.println(br.readLine()); 46 | 47 | br.close(); 48 | isr.close(); 49 | ubis.close(); 50 | fis.close(); 51 | } 52 | 53 | } // UnicodeBOMInputStreamUsage 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnicodeBOMInputStream 2 | 3 | A helper class to skip [Unicode BOMs] at the beginning of input streams. 4 | 5 | I initially released this class as a [Stack Overflow answer] and it apparently 6 | got copy-pasted into several Java projects already. However, code put as answers 7 | on Stack Overflow is licensed under [CC-BY-SA 3.0] which may not suit everybody. 8 | 9 | [Unicode BOMs]: http://www.unicode.org/faq/utf_bom.html#bom1 10 | [Stack Overflow answer]: http://stackoverflow.com/a/1835529/216063 11 | 12 | -------------------------------------------------------------------------------- 13 | 14 | ## Why? 15 | 16 | Many years have passed since I wrote this class and today Java still doesn't 17 | properly deal with UTF-8 Unicode Byte Order Marks (BOMs) at the beginning of 18 | data. 19 | 20 | In 2001, someone opened bug [JDK-4508058] with the sound expectation that Java 21 | should detect and skip UTF-8 BOMs at the beginning of UTF-8 streams, the same 22 | way it does for e.g. UTF-16. 23 | 24 | Bug [JDK-4508058] remained open for a while, got fixed, and ultimately got 25 | reverted because existing Java code relied on UTF-8 BOMs not being skipped, see 26 | [JDK-6378911]: 27 | 28 | > the Java EE 5 RI and SJSAS 9.0 has been relying on detecting a BOM, setting 29 | > the appropriate encoding, and discarding the BOM bytes before reading the 30 | > input 31 | 32 | > The problem is that we cannot implement different behaviour depending on the 33 | > JRE version we're running against. 34 | 35 | In the end, instead of fixing [JDK-4508058] and accept this would be an 36 | annoyance only for Java EE 5 RI and SJSAS 9.0 users, people in charge at Sun 37 | couldn't be bothered supporting 2 JDK versions and decided we're all living in a 38 | better world if [JDK-4508058] gets closed as "won't fix". 39 | 40 | In 2010, someone opened bug [JDK-6959785] to reconsider the decision... 41 | 42 | For more than 20 years now, every now and then, someone in the world edits an 43 | XML file with `Notepad.exe` which adds useless UTF-8 BOMs, and breaks their 44 | favorite Java XML parser. 45 | 46 | Meanwhile, just skip the BOM yourself. 47 | 48 | [JDK-4508058]: https://bugs.java.com/bugdatabase/view_bug?bug_id=4508058 49 | [JDK-6378911]: https://bugs.java.com/bugdatabase/view_bug?bug_id=6378911 50 | [JDK-6959785]: https://bugs.java.com/bugdatabase/view_bug?bug_id=6959785 51 | [CC-BY-SA 3.0]: http://creativecommons.org/licenses/by-sa/3.0/legalcode 52 | 53 | -------------------------------------------------------------------------------- 54 | 55 | ## Usage 56 | 57 | Wrap any `InputStream` with `UnicodeBOMInputStream` and use the `getBOM()` 58 | and/or `skipBOM()` methods. See [`UnicodeBOMInputStreamUsage.java`]. 59 | 60 | [`UnicodeBOMInputStreamUsage.java`]: example/net/pempek/unicode/UnicodeBOMInputStreamUsage.java 61 | 62 | -------------------------------------------------------------------------------- 63 | 64 | If you find this library useful and decide to use it in your own projects please 65 | drop me a line [@gpakosz]. 66 | 67 | [@gpakosz]: https://twitter.com/gpakosz 68 | -------------------------------------------------------------------------------- /test/net/pempek/unicode/UnicodeBOMInputStreamTest.java: -------------------------------------------------------------------------------- 1 | // (‑●‑●)> released under the WTFPL v2 license, by Gregory Pakosz (@gpakosz) 2 | 3 | package net.pempek.unicode; 4 | 5 | import java.io.ByteArrayInputStream; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | import java.io.InputStreamReader; 9 | 10 | import junit.framework.Test; 11 | import junit.framework.TestCase; 12 | import junit.framework.TestSuite; 13 | import net.pempek.unicode.UnicodeBOMInputStream.BOM; 14 | 15 | /** 16 | * The UnicodeBOMInputStreamTest class tests the 17 | * UnicodeBOMInputStream class. 18 | * 19 | * @see net.pempek.unicode.UnicodeBOMInputStream 20 | * 21 | * @author Gregory Pakosz 22 | * @version 1.0 23 | */ 24 | public class UnicodeBOMInputStreamTest extends TestCase 25 | { 26 | public final void test_UnicodeBOMInputStream_InputStream() throws IOException 27 | { 28 | try 29 | { 30 | new UnicodeBOMInputStream(null); 31 | fail("should have raised a NullPointerException exception"); 32 | } 33 | catch(final NullPointerException e) 34 | { 35 | // success 36 | } 37 | } 38 | 39 | public void test_getBOM() throws IOException 40 | { 41 | int i; 42 | int value; 43 | 44 | final UnicodeBOMInputStream content = new UnicodeBOMInputStream(new ByteArrayInputStream(CONTENT)); 45 | 46 | assertEquals(BOM.NONE, content.getBOM()); 47 | 48 | i = 0; 49 | while ((value = content.read()) != -1) 50 | assertEquals(value, CONTENT[i++]); 51 | 52 | content.close(); 53 | 54 | final UnicodeBOMInputStream utf8BOM = new UnicodeBOMInputStream(new ByteArrayInputStream(UTF8_BOM_CONTENT)); 55 | 56 | assertEquals(BOM.UTF_8, utf8BOM.getBOM()); 57 | 58 | utf8BOM.skipBOM(); 59 | 60 | i = 0; 61 | while ((value = utf8BOM.read()) != -1) 62 | assertEquals(value, CONTENT[i++]); 63 | 64 | utf8BOM.close(); 65 | 66 | final UnicodeBOMInputStream utf16BEBOM = new UnicodeBOMInputStream(new ByteArrayInputStream(UTF16_BE_BOM_CONTENT)); 67 | 68 | assertEquals(BOM.UTF_16_BE, utf16BEBOM.getBOM()); 69 | 70 | utf16BEBOM.skipBOM(); 71 | 72 | i = 0; 73 | while ((value = utf16BEBOM.read()) != -1) 74 | assertEquals(value, CONTENT[i++]); 75 | 76 | utf16BEBOM.close(); 77 | 78 | final UnicodeBOMInputStream utf16LEBOM = new UnicodeBOMInputStream(new ByteArrayInputStream(UTF16_LE_BOM_CONTENT)); 79 | 80 | assertEquals(BOM.UTF_16_LE, utf16LEBOM.getBOM()); 81 | 82 | utf16LEBOM.skipBOM(); 83 | 84 | i = 0; 85 | while ((value = utf16LEBOM.read()) != -1) 86 | assertEquals(value, CONTENT[i++]); 87 | 88 | utf16LEBOM.close(); 89 | 90 | final UnicodeBOMInputStream utf32BEBOM = new UnicodeBOMInputStream(new ByteArrayInputStream(UTF32_BE_BOM_CONTENT)); 91 | 92 | assertEquals(BOM.UTF_32_BE, utf32BEBOM.getBOM()); 93 | 94 | utf32BEBOM.skipBOM(); 95 | 96 | i = 0; 97 | while ((value = utf32BEBOM.read()) != -1) 98 | assertEquals(value, CONTENT[i++]); 99 | 100 | utf32BEBOM.close(); 101 | 102 | final UnicodeBOMInputStream utf32LEBOM = new UnicodeBOMInputStream(new ByteArrayInputStream(UTF32_LE_BOM_CONTENT)); 103 | 104 | assertEquals(BOM.UTF_32_LE, utf32LEBOM.getBOM()); 105 | 106 | utf32LEBOM.skipBOM(); 107 | 108 | i = 0; 109 | while ((value = utf32LEBOM.read()) != -1) 110 | assertEquals(value, CONTENT[i++]); 111 | 112 | utf32LEBOM.close(); 113 | } 114 | 115 | public void test_JavaBehaviour() throws IOException 116 | { 117 | final InputStream utf8BOM = new ByteArrayInputStream(UTF8_BOM_CONTENT); 118 | final InputStreamReader reader = new InputStreamReader(utf8BOM, "UTF-8"); 119 | 120 | assertEquals(0xFEFF, reader.read()); // http://www.fileformat.info/info/unicode/char/feff/ 121 | 122 | for (int i = 0; i < UTF8_BOM_CONTENT.length-3; ++i) 123 | assertEquals(UTF8_BOM_CONTENT[i+3], reader.read()); 124 | 125 | assertEquals(-1, reader.read()); 126 | } 127 | 128 | private static final byte[] CONTENT = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; 129 | private static final byte[] UTF8_BOM_CONTENT; 130 | private static final byte[] UTF16_BE_BOM_CONTENT; 131 | private static final byte[] UTF16_LE_BOM_CONTENT; 132 | private static final byte[] UTF32_BE_BOM_CONTENT; 133 | private static final byte[] UTF32_LE_BOM_CONTENT; 134 | 135 | static 136 | { 137 | UTF8_BOM_CONTENT = new byte[BOM.UTF_8.getBytes().length + CONTENT.length]; 138 | 139 | System.arraycopy(BOM.UTF_8.getBytes(), 0, UTF8_BOM_CONTENT, 0, BOM.UTF_8.getBytes().length); 140 | System.arraycopy(CONTENT, 0, UTF8_BOM_CONTENT, BOM.UTF_8.getBytes().length, CONTENT.length); 141 | 142 | UTF16_BE_BOM_CONTENT = new byte[BOM.UTF_16_BE.getBytes().length + CONTENT.length]; 143 | 144 | System.arraycopy(BOM.UTF_16_BE.getBytes(), 0, UTF16_BE_BOM_CONTENT, 0, BOM.UTF_16_BE.getBytes().length); 145 | System.arraycopy(CONTENT, 0, UTF16_BE_BOM_CONTENT, BOM.UTF_16_BE.getBytes().length, CONTENT.length); 146 | 147 | UTF16_LE_BOM_CONTENT = new byte[BOM.UTF_16_LE.getBytes().length + CONTENT.length]; 148 | 149 | System.arraycopy(BOM.UTF_16_LE.getBytes(), 0, UTF16_LE_BOM_CONTENT, 0, BOM.UTF_16_LE.getBytes().length); 150 | System.arraycopy(CONTENT, 0, UTF16_LE_BOM_CONTENT, BOM.UTF_16_LE.getBytes().length, CONTENT.length); 151 | 152 | UTF32_BE_BOM_CONTENT = new byte[BOM.UTF_32_BE.getBytes().length + CONTENT.length]; 153 | 154 | System.arraycopy(BOM.UTF_32_BE.getBytes(), 0, UTF32_BE_BOM_CONTENT, 0, BOM.UTF_32_BE.getBytes().length); 155 | System.arraycopy(CONTENT, 0, UTF32_BE_BOM_CONTENT, BOM.UTF_32_BE.getBytes().length, CONTENT.length); 156 | 157 | UTF32_LE_BOM_CONTENT = new byte[BOM.UTF_32_LE.getBytes().length + CONTENT.length]; 158 | 159 | System.arraycopy(BOM.UTF_32_LE.getBytes(), 0, UTF32_LE_BOM_CONTENT, 0, BOM.UTF_32_LE.getBytes().length); 160 | System.arraycopy(CONTENT, 0, UTF32_LE_BOM_CONTENT, BOM.UTF_32_LE.getBytes().length, CONTENT.length); 161 | } 162 | 163 | public final static Test suite() 164 | { 165 | return new TestSuite(UnicodeBOMInputStreamTest.class); 166 | } 167 | 168 | public static void main(String[] args) 169 | { 170 | junit.textui.TestRunner.run(suite()); 171 | } 172 | 173 | } // UnicodeBOMInputStreamTest 174 | -------------------------------------------------------------------------------- /src/net/pempek/unicode/UnicodeBOMInputStream.java: -------------------------------------------------------------------------------- 1 | // (‑●‑●)> released under the WTFPL v2 license, by Gregory Pakosz (@gpakosz) 2 | 3 | package net.pempek.unicode; 4 | 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.io.PushbackInputStream; 8 | 9 | /** 10 | * The UnicodeBOMInputStream class wraps any 11 | * InputStream and detects the presence of any Unicode BOM 12 | * (Byte Order Mark) at its beginning, as defined by 13 | * RFC 3629 - UTF-8, a 14 | * transformation format of ISO 10646 15 | * 16 | *

The 17 | * Unicode FAQ 18 | * defines 5 types of BOMs:

25 | * 26 | *

Use the {@link #getBOM()} method to know whether a BOM has been detected 27 | * or not. 28 | *

29 | *

Use the {@link #skipBOM()} method to remove the detected BOM from the 30 | * wrapped InputStream object.

31 | * 32 | * @author Gregory Pakosz 33 | * @version 1.0 34 | */ 35 | public class UnicodeBOMInputStream extends InputStream 36 | { 37 | /** 38 | * Type safe enumeration class that describes the different types of Unicode 39 | * BOMs. 40 | */ 41 | public static final class BOM 42 | { 43 | /** 44 | * NONE. 45 | */ 46 | public static final BOM NONE = new BOM(new byte[]{}, "NONE"); 47 | 48 | /** 49 | * UTF-8 BOM (EF BB BF). 50 | */ 51 | public static final BOM UTF_8 = new BOM(new byte[]{(byte)0xEF, 52 | (byte)0xBB, 53 | (byte)0xBF}, 54 | "UTF-8"); 55 | 56 | /** 57 | * UTF-16, little-endian (FF FE). 58 | */ 59 | public static final BOM UTF_16_LE = new BOM(new byte[]{ (byte)0xFF, 60 | (byte)0xFE}, 61 | "UTF-16 little-endian"); 62 | 63 | /** 64 | * UTF-16, big-endian (FE FF). 65 | */ 66 | public static final BOM UTF_16_BE = new BOM(new byte[]{ (byte)0xFE, 67 | (byte)0xFF}, 68 | "UTF-16 big-endian"); 69 | 70 | /** 71 | * UTF-32, little-endian (FF FE 00 00). 72 | */ 73 | public static final BOM UTF_32_LE = new BOM(new byte[]{ (byte)0xFF, 74 | (byte)0xFE, 75 | (byte)0x00, 76 | (byte)0x00}, 77 | "UTF-32 little-endian"); 78 | 79 | /** 80 | * UTF-32, big-endian (00 00 FE FF). 81 | */ 82 | public static final BOM UTF_32_BE = new BOM(new byte[]{ (byte)0x00, 83 | (byte)0x00, 84 | (byte)0xFE, 85 | (byte)0xFF}, 86 | "UTF-32 big-endian"); 87 | 88 | /** 89 | * Returns a String representation of this BOM 90 | * value. 91 | */ 92 | public final String toString() 93 | { 94 | return description; 95 | } 96 | 97 | /** 98 | * Returns the bytes corresponding to this BOM value. 99 | */ 100 | public final byte[] getBytes() 101 | { 102 | final int length = bytes.length; 103 | final byte[] result = new byte[length]; 104 | 105 | // make a defensive copy 106 | System.arraycopy(bytes, 0, result, 0, length); 107 | 108 | return result; 109 | } 110 | 111 | private BOM(final byte bom[], final String description) 112 | { 113 | assert(bom != null) : "invalid BOM: null is not allowed"; 114 | assert(description != null) : "invalid description: null is not allowed"; 115 | assert(description.length() != 0) : "invalid description: empty string is not allowed"; 116 | 117 | this.bytes = bom; 118 | this.description = description; 119 | } 120 | 121 | final byte bytes[]; 122 | private final String description; 123 | 124 | } // BOM 125 | 126 | /** 127 | * Constructs a new UnicodeBOMInputStream that wraps the 128 | * specified InputStream. 129 | * 130 | * @param inputStream an InputStream. 131 | * 132 | * @throws NullPointerException when inputStream is 133 | * null. 134 | * @throws IOException on reading from the specified InputStream 135 | * when trying to detect the Unicode BOM. 136 | */ 137 | public UnicodeBOMInputStream(final InputStream inputStream) throws NullPointerException, 138 | IOException 139 | { 140 | if (inputStream == null) 141 | throw new NullPointerException("invalid input stream: null is not allowed"); 142 | 143 | in = new PushbackInputStream(inputStream, 4); 144 | 145 | final byte bom[] = new byte[4]; 146 | final int read = in.read(bom); 147 | 148 | switch(read) 149 | { 150 | case 4: 151 | if ((bom[0] == (byte)0xFF) && 152 | (bom[1] == (byte)0xFE) && 153 | (bom[2] == (byte)0x00) && 154 | (bom[3] == (byte)0x00)) 155 | { 156 | this.bom = BOM.UTF_32_LE; 157 | break; 158 | } 159 | else 160 | if ((bom[0] == (byte)0x00) && 161 | (bom[1] == (byte)0x00) && 162 | (bom[2] == (byte)0xFE) && 163 | (bom[3] == (byte)0xFF)) 164 | { 165 | this.bom = BOM.UTF_32_BE; 166 | break; 167 | } 168 | 169 | case 3: 170 | if ((bom[0] == (byte)0xEF) && 171 | (bom[1] == (byte)0xBB) && 172 | (bom[2] == (byte)0xBF)) 173 | { 174 | this.bom = BOM.UTF_8; 175 | break; 176 | } 177 | 178 | case 2: 179 | if ((bom[0] == (byte)0xFF) && 180 | (bom[1] == (byte)0xFE)) 181 | { 182 | this.bom = BOM.UTF_16_LE; 183 | break; 184 | } 185 | else 186 | if ((bom[0] == (byte)0xFE) && 187 | (bom[1] == (byte)0xFF)) 188 | { 189 | this.bom = BOM.UTF_16_BE; 190 | break; 191 | } 192 | 193 | default: 194 | this.bom = BOM.NONE; 195 | break; 196 | } 197 | 198 | if (read > 0) 199 | in.unread(bom, 0, read); 200 | } 201 | 202 | /** 203 | * Returns the BOM that was detected in the wrapped 204 | * InputStream object. 205 | * 206 | * @return a BOM value. 207 | */ 208 | public final BOM getBOM() 209 | { 210 | // BOM type is immutable. 211 | return bom; 212 | } 213 | 214 | /** 215 | * Skips the BOM that was found in the wrapped 216 | * InputStream object. 217 | * 218 | * @return this UnicodeBOMInputStream. 219 | * 220 | * @throws IOException when trying to skip the BOM from the wrapped 221 | * InputStream object. 222 | */ 223 | public final synchronized UnicodeBOMInputStream skipBOM() throws IOException 224 | { 225 | if (!skipped) 226 | { 227 | in.skip(bom.bytes.length); 228 | skipped = true; 229 | } 230 | return this; 231 | } 232 | 233 | @Override 234 | public int read() throws IOException 235 | { 236 | return in.read(); 237 | } 238 | 239 | @Override 240 | public int read(final byte b[]) throws IOException, 241 | NullPointerException 242 | { 243 | return in.read(b, 0, b.length); 244 | } 245 | 246 | @Override 247 | public int read(final byte b[], 248 | final int off, 249 | final int len) throws IOException, 250 | NullPointerException 251 | { 252 | return in.read(b, off, len); 253 | } 254 | 255 | @Override 256 | public long skip(final long n) throws IOException 257 | { 258 | return in.skip(n); 259 | } 260 | 261 | @Override 262 | public int available() throws IOException 263 | { 264 | return in.available(); 265 | } 266 | 267 | @Override 268 | public void close() throws IOException 269 | { 270 | in.close(); 271 | } 272 | 273 | @Override 274 | public synchronized void mark(final int readlimit) 275 | { 276 | in.mark(readlimit); 277 | } 278 | 279 | @Override 280 | public synchronized void reset() throws IOException 281 | { 282 | in.reset(); 283 | } 284 | 285 | @Override 286 | public boolean markSupported() 287 | { 288 | return in.markSupported(); 289 | } 290 | 291 | private final PushbackInputStream in; 292 | private final BOM bom; 293 | private boolean skipped = false; 294 | 295 | } // UnicodeBOMInputStream 296 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=true 3 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 4 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 5 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 6 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 7 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 8 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 9 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0 10 | org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 11 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=52 12 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48 13 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 14 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 15 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 16 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 17 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 18 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 19 | org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 20 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0 21 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=64 22 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=64 23 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=64 24 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=64 25 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=64 26 | org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 27 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 28 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1 29 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0 30 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 31 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 32 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 33 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1 34 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 35 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0 36 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 37 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 38 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line 39 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line 40 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line 41 | org.eclipse.jdt.core.formatter.brace_position_for_block=next_line 42 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line 43 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line 44 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line 45 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line 46 | org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line 47 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line 48 | org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line 49 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line 50 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true 51 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true 52 | org.eclipse.jdt.core.formatter.comment.format_block_comments=true 53 | org.eclipse.jdt.core.formatter.comment.format_header=true 54 | org.eclipse.jdt.core.formatter.comment.format_html=true 55 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true 56 | org.eclipse.jdt.core.formatter.comment.format_line_comments=true 57 | org.eclipse.jdt.core.formatter.comment.format_source_code=true 58 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true 59 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=true 60 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert 61 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert 62 | org.eclipse.jdt.core.formatter.comment.line_length=80 63 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true 64 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true 65 | org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false 66 | org.eclipse.jdt.core.formatter.compact_else_if=true 67 | org.eclipse.jdt.core.formatter.continuation_indentation=2 68 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 69 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off 70 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on 71 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false 72 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true 73 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true 74 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true 75 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true 76 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true 77 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true 78 | org.eclipse.jdt.core.formatter.indent_empty_lines=false 79 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true 80 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true 81 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true 82 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true 83 | org.eclipse.jdt.core.formatter.indentation.size=4 84 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert 85 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert 86 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert 87 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert 88 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert 89 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert 90 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert 91 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert 92 | org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert 93 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert 94 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert 95 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert 96 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert 97 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert 98 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert 99 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert 100 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert 101 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert 102 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert 103 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert 104 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert 105 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert 106 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert 107 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert 108 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert 109 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert 110 | org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert 111 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert 112 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert 113 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert 114 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert 115 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert 116 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert 117 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert 118 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert 119 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert 120 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert 121 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert 122 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert 123 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert 124 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert 125 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert 126 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert 127 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert 128 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert 129 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert 130 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert 131 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert 132 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert 133 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert 134 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert 135 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert 136 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert 137 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert 138 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert 139 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert 140 | org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert 141 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert 142 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert 143 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert 144 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert 145 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert 146 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert 147 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert 148 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert 149 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert 150 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert 151 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert 152 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert 153 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert 154 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert 155 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert 156 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert 157 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert 158 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert 159 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert 160 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert 161 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert 162 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert 163 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert 164 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert 165 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert 166 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert 167 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert 168 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert 169 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert 170 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert 171 | org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert 172 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert 173 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert 174 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert 175 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert 176 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert 177 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert 178 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert 179 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert 180 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert 181 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert 182 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert 183 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert 184 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert 185 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert 186 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert 187 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert 188 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert 189 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert 190 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert 191 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert 192 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert 193 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert 194 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert 195 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert 196 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert 197 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=insert 198 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert 199 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert 200 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert 201 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert 202 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert 203 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert 204 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert 205 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert 206 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert 207 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert 208 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert 209 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert 210 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert 211 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert 212 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert 213 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert 214 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert 215 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert 216 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert 217 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert 218 | org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert 219 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert 220 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert 221 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert 222 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert 223 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert 224 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=do not insert 225 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert 226 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert 227 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert 228 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert 229 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert 230 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert 231 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert 232 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert 233 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert 234 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert 235 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert 236 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert 237 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert 238 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert 239 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert 240 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert 241 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert 242 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert 243 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert 244 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert 245 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert 246 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert 247 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert 248 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert 249 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert 250 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert 251 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert 252 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert 253 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert 254 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert 255 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert 256 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert 257 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert 258 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert 259 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert 260 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert 261 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert 262 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert 263 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert 264 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert 265 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert 266 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert 267 | org.eclipse.jdt.core.formatter.join_lines_in_comments=true 268 | org.eclipse.jdt.core.formatter.join_wrapped_lines=true 269 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false 270 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false 271 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false 272 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false 273 | org.eclipse.jdt.core.formatter.lineSplit=120 274 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false 275 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false 276 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 277 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=2 278 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false 279 | org.eclipse.jdt.core.formatter.tabulation.char=space 280 | org.eclipse.jdt.core.formatter.tabulation.size=2 281 | org.eclipse.jdt.core.formatter.use_on_off_tags=false 282 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false 283 | org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true 284 | org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true 285 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true 286 | --------------------------------------------------------------------------------