Changeset 8132 in josm for trunk/src/com/drew/lang
- Timestamp:
- 2015-03-10T01:17:39+01:00 (10 years ago)
- Location:
- trunk/src/com/drew/lang
- Files:
-
- 6 added
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/drew/lang/BufferBoundsException.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 22 22 package com.drew.lang; 23 23 24 import com.drew.lang.annotations.NotNull;25 26 24 import java.io.IOException; 27 25 28 26 /** 29 * A checked replacement for IndexOutOfBoundsException. Used by BufferReader.30 * 31 * @author Drew Noakes http://drewnoakes.com 27 * A checked replacement for {@link IndexOutOfBoundsException}. Used by {@link RandomAccessReader}. 28 * 29 * @author Drew Noakes https://drewnoakes.com 32 30 */ 33 public final class BufferBoundsException extends Exception 31 public final class BufferBoundsException extends IOException 34 32 { 35 33 private static final long serialVersionUID = 2911102837808946396L; 36 34 37 public BufferBoundsException( @NotNull byte[] buffer,int index, int bytesRequested)35 public BufferBoundsException(int index, int bytesRequested, long bufferLength) 38 36 { 39 super(getMessage( buffer,index, bytesRequested));37 super(getMessage(index, bytesRequested, bufferLength)); 40 38 } 41 39 … … 45 43 } 46 44 47 public BufferBoundsException(final String message, final IOException innerException) 48 { 49 super(message, innerException); 50 } 51 52 private static String getMessage(@NotNull byte[] buffer, int index, int bytesRequested) 45 private static String getMessage(int index, int bytesRequested, long bufferLength) 53 46 { 54 47 if (index < 0) 55 return String.format("Attempt to read from buffer using a negative index (% s)", index);48 return String.format("Attempt to read from buffer using a negative index (%d)", index); 56 49 57 return String.format("Attempt to read %d byte%s from beyond end of buffer (requested index: %d, max index: %d)", 58 bytesRequested, bytesRequested==1?"":"s", index, buffer.length - 1); 50 if (bytesRequested < 0) 51 return String.format("Number of requested bytes cannot be negative (%d)", bytesRequested); 52 53 if ((long)index + (long)bytesRequested - 1L > (long)Integer.MAX_VALUE) 54 return String.format("Number of requested bytes summed with starting index exceed maximum range of signed 32 bit integers (requested index: %d, requested count: %d)", index, bytesRequested); 55 56 return String.format("Attempt to read from beyond end of underlying data source (requested index: %d, requested count: %d, max index: %d)", 57 index, bytesRequested, bufferLength - 1); 59 58 } 60 59 } -
trunk/src/com/drew/lang/ByteArrayReader.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 24 24 import com.drew.lang.annotations.NotNull; 25 25 26 import java.io. UnsupportedEncodingException;26 import java.io.IOException; 27 27 28 28 /** 29 29 * Provides methods to read specific values from a byte array, with a consistent, checked exception structure for 30 30 * issues. 31 * <p />31 * <p> 32 32 * By default, the reader operates with Motorola byte order (big endianness). This can be changed by calling 33 * {@seesetMotorolaByteOrder(boolean)}.34 * 35 * @author Drew Noakes http://drewnoakes.com 33 * <code>setMotorolaByteOrder(boolean)</code>. 34 * 35 * @author Drew Noakes https://drewnoakes.com 36 36 * */ 37 public class ByteArrayReader implements BufferReader37 public class ByteArrayReader extends RandomAccessReader 38 38 { 39 39 @NotNull 40 40 private final byte[] _buffer; 41 private boolean _isMotorolaByteOrder = true;42 41 43 42 @SuppressWarnings({ "ConstantConditions" }) … … 47 46 if (buffer == null) 48 47 throw new NullPointerException(); 49 48 50 49 _buffer = buffer; 51 50 } … … 57 56 } 58 57 59 60 58 @Override 61 p ublic void setMotorolaByteOrder(boolean motorolaByteOrder)59 protected byte getByte(int index) throws IOException 62 60 { 63 _isMotorolaByteOrder = motorolaByteOrder;64 }65 66 @Override67 public boolean isMotorolaByteOrder()68 {69 return _isMotorolaByteOrder;70 }71 72 @Override73 public short getUInt8(int index) throws BufferBoundsException74 {75 checkBounds(index, 1);76 77 return (short) (_buffer[index] & 255);78 }79 80 @Override81 public byte getInt8(int index) throws BufferBoundsException82 {83 checkBounds(index, 1);84 85 61 return _buffer[index]; 86 62 } 87 63 88 64 @Override 89 p ublic int getUInt16(int index) throwsBufferBoundsException65 protected void validateIndex(int index, int bytesRequested) throws IOException 90 66 { 91 checkBounds(index, 2); 92 93 if (_isMotorolaByteOrder) { 94 // Motorola - MSB first 95 return (_buffer[index ] << 8 & 0xFF00) | 96 (_buffer[index + 1] & 0xFF); 97 } else { 98 // Intel ordering - LSB first 99 return (_buffer[index + 1] << 8 & 0xFF00) | 100 (_buffer[index ] & 0xFF); 101 } 67 if (!isValidIndex(index, bytesRequested)) 68 throw new BufferBoundsException(index, bytesRequested, _buffer.length); 102 69 } 103 70 104 71 @Override 105 p ublic short getInt16(int index) throwsBufferBoundsException72 protected boolean isValidIndex(int index, int bytesRequested) throws IOException 106 73 { 107 checkBounds(index, 2); 108 109 if (_isMotorolaByteOrder) { 110 // Motorola - MSB first 111 return (short) (((short)_buffer[index ] << 8 & (short)0xFF00) | 112 ((short)_buffer[index + 1] & (short)0xFF)); 113 } else { 114 // Intel ordering - LSB first 115 return (short) (((short)_buffer[index + 1] << 8 & (short)0xFF00) | 116 ((short)_buffer[index ] & (short)0xFF)); 117 } 74 return bytesRequested >= 0 75 && index >= 0 76 && (long)index + (long)bytesRequested - 1L < (long)_buffer.length; 118 77 } 119 78 120 79 @Override 121 public long getUInt32(int index) throws BufferBoundsException 80 @NotNull 81 public byte[] getBytes(int index, int count) throws IOException 122 82 { 123 checkBounds(index, 4); 124 125 if (_isMotorolaByteOrder) { 126 // Motorola - MSB first (big endian) 127 return (((long)_buffer[index ]) << 24 & 0xFF000000L) | 128 (((long)_buffer[index + 1]) << 16 & 0xFF0000L) | 129 (((long)_buffer[index + 2]) << 8 & 0xFF00L) | 130 (((long)_buffer[index + 3]) & 0xFFL); 131 } else { 132 // Intel ordering - LSB first (little endian) 133 return (((long)_buffer[index + 3]) << 24 & 0xFF000000L) | 134 (((long)_buffer[index + 2]) << 16 & 0xFF0000L) | 135 (((long)_buffer[index + 1]) << 8 & 0xFF00L) | 136 (((long)_buffer[index ]) & 0xFFL); 137 } 138 } 139 140 @Override 141 public int getInt32(int index) throws BufferBoundsException 142 { 143 checkBounds(index, 4); 144 145 if (_isMotorolaByteOrder) { 146 // Motorola - MSB first (big endian) 147 return (_buffer[index ] << 24 & 0xFF000000) | 148 (_buffer[index + 1] << 16 & 0xFF0000) | 149 (_buffer[index + 2] << 8 & 0xFF00) | 150 (_buffer[index + 3] & 0xFF); 151 } else { 152 // Intel ordering - LSB first (little endian) 153 return (_buffer[index + 3] << 24 & 0xFF000000) | 154 (_buffer[index + 2] << 16 & 0xFF0000) | 155 (_buffer[index + 1] << 8 & 0xFF00) | 156 (_buffer[index ] & 0xFF); 157 } 158 } 159 160 @Override 161 public long getInt64(int index) throws BufferBoundsException 162 { 163 checkBounds(index, 8); 164 165 if (_isMotorolaByteOrder) { 166 // Motorola - MSB first 167 return ((long)_buffer[index ] << 56 & 0xFF00000000000000L) | 168 ((long)_buffer[index + 1] << 48 & 0xFF000000000000L) | 169 ((long)_buffer[index + 2] << 40 & 0xFF0000000000L) | 170 ((long)_buffer[index + 3] << 32 & 0xFF00000000L) | 171 ((long)_buffer[index + 4] << 24 & 0xFF000000L) | 172 ((long)_buffer[index + 5] << 16 & 0xFF0000L) | 173 ((long)_buffer[index + 6] << 8 & 0xFF00L) | 174 ((long)_buffer[index + 7] & 0xFFL); 175 } else { 176 // Intel ordering - LSB first 177 return ((long)_buffer[index + 7] << 56 & 0xFF00000000000000L) | 178 ((long)_buffer[index + 6] << 48 & 0xFF000000000000L) | 179 ((long)_buffer[index + 5] << 40 & 0xFF0000000000L) | 180 ((long)_buffer[index + 4] << 32 & 0xFF00000000L) | 181 ((long)_buffer[index + 3] << 24 & 0xFF000000L) | 182 ((long)_buffer[index + 2] << 16 & 0xFF0000L) | 183 ((long)_buffer[index + 1] << 8 & 0xFF00L) | 184 ((long)_buffer[index ] & 0xFFL); 185 } 186 } 187 188 @Override 189 public float getS15Fixed16(int index) throws BufferBoundsException 190 { 191 checkBounds(index, 4); 192 193 if (_isMotorolaByteOrder) { 194 float res = (_buffer[index ] & 255) << 8 | 195 (_buffer[index + 1] & 255); 196 int d = (_buffer[index + 2] & 255) << 8 | 197 (_buffer[index + 3] & 255); 198 return (float)(res + d/65536.0); 199 } else { 200 // this particular branch is untested 201 float res = (_buffer[index + 3] & 255) << 8 | 202 (_buffer[index + 2] & 255); 203 int d = (_buffer[index + 1] & 255) << 8 | 204 (_buffer[index ] & 255); 205 return (float)(res + d/65536.0); 206 } 207 } 208 209 @Override 210 public float getFloat32(int index) throws BufferBoundsException 211 { 212 return Float.intBitsToFloat(getInt32(index)); 213 } 214 215 @Override 216 public double getDouble64(int index) throws BufferBoundsException 217 { 218 return Double.longBitsToDouble(getInt64(index)); 219 } 220 221 @Override 222 @NotNull 223 public byte[] getBytes(int index, int count) throws BufferBoundsException 224 { 225 checkBounds(index, count); 83 validateIndex(index, count); 226 84 227 85 byte[] bytes = new byte[count]; … … 229 87 return bytes; 230 88 } 231 232 @Override233 @NotNull234 public String getString(int index, int bytesRequested) throws BufferBoundsException235 {236 return new String(getBytes(index, bytesRequested));237 }238 239 @Override240 @NotNull241 public String getString(int index, int bytesRequested, String charset) throws BufferBoundsException242 {243 byte[] bytes = getBytes(index, bytesRequested);244 try {245 return new String(bytes, charset);246 } catch (UnsupportedEncodingException e) {247 return new String(bytes);248 }249 }250 251 @Override252 @NotNull253 public String getNullTerminatedString(int index, int maxLengthBytes) throws BufferBoundsException254 {255 // NOTE currently only really suited to single-byte character strings256 257 checkBounds(index, maxLengthBytes);258 259 // Check for null terminators260 int length = 0;261 while ((index + length) < _buffer.length && _buffer[index + length] != '\0' && length < maxLengthBytes)262 length++;263 264 byte[] bytes = getBytes(index, length);265 return new String(bytes);266 }267 268 private void checkBounds(final int index, final int bytesRequested) throws BufferBoundsException269 {270 if (bytesRequested < 0 || index < 0 || (long)index + (long)bytesRequested - 1L >= (long)_buffer.length)271 throw new BufferBoundsException(_buffer, index, bytesRequested);272 }273 89 } -
trunk/src/com/drew/lang/CompoundException.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 package com.drew.lang; … … 32 32 * of these previous JDK versions. 33 33 * 34 * @author Drew Noakes http://drewnoakes.com 34 * @author Drew Noakes https://drewnoakes.com 35 35 */ 36 36 public class CompoundException extends Exception … … 63 63 } 64 64 65 @Override 65 66 @NotNull 66 67 public String toString() … … 77 78 } 78 79 80 @Override 79 81 public void printStackTrace(@NotNull PrintStream s) 80 82 { … … 86 88 } 87 89 90 @Override 88 91 public void printStackTrace(@NotNull PrintWriter s) 89 92 { … … 95 98 } 96 99 100 @Override 97 101 public void printStackTrace() 98 102 { -
trunk/src/com/drew/lang/GeoLocation.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 25 25 import com.drew.lang.annotations.Nullable; 26 26 27 import java.text.DecimalFormat; 28 27 29 /** 28 30 * Represents a latitude and longitude pair, giving a position on earth in spherical coordinates. 31 * <p> 29 32 * Values of latitude and longitude are given in degrees. 33 * <p> 30 34 * This type is immutable. 31 35 */ … … 79 83 { 80 84 double[] dms = decimalToDegreesMinutesSeconds(decimal); 81 return dms[0] + "° " + dms[1] + "' " + dms[2] + '"'; 85 DecimalFormat format = new DecimalFormat("0.##"); 86 return String.format("%s° %s' %s\"", format.format(dms[0]), format.format(dms[1]), format.format(dms[2])); 82 87 } 83 88 -
trunk/src/com/drew/lang/NullOutputStream.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 package com.drew.lang; … … 27 27 * An implementation of OutputSteam that ignores write requests by doing nothing. This class may be useful in tests. 28 28 * 29 * @author Drew Noakes http://drewnoakes.com 29 * @author Drew Noakes https://drewnoakes.com 30 30 */ 31 31 public class NullOutputStream extends OutputStream … … 36 36 } 37 37 38 @Override 38 39 public void write(int b) throws IOException 39 40 { -
trunk/src/com/drew/lang/Rational.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 29 29 /** 30 30 * Immutable class for holding a rational number without loss of precision. Provides 31 * a familiar representation via toString() in form <code>numerator/denominator</code>. 32 * 33 * @author Drew Noakes http://drewnoakes.com 31 * a familiar representation via {@link Rational#toString} in form <code>numerator/denominator</code>. 32 * 33 * Note that any value with a numerator of zero will be treated as zero, even if the 34 * denominator is also zero. 35 * 36 * @author Drew Noakes https://drewnoakes.com 34 37 */ 35 38 public class Rational extends java.lang.Number implements Serializable … … 61 64 * to type <code>double</code>. 62 65 */ 66 @Override 63 67 public double doubleValue() 64 68 { 65 return (double) _numerator / (double) _denominator; 69 return _numerator == 0 70 ? 0.0 71 : (double) _numerator / (double) _denominator; 66 72 } 67 73 … … 73 79 * to type <code>float</code>. 74 80 */ 81 @Override 75 82 public float floatValue() 76 83 { 77 return (float) _numerator / (float) _denominator; 84 return _numerator == 0 85 ? 0.0f 86 : (float) _numerator / (float) _denominator; 78 87 } 79 88 … … 81 90 * Returns the value of the specified number as a <code>byte</code>. 82 91 * This may involve rounding or truncation. This implementation simply 83 * casts the result of <code>doubleValue()</code>to <code>byte</code>.92 * casts the result of {@link Rational#doubleValue} to <code>byte</code>. 84 93 * 85 94 * @return the numeric value represented by this object after conversion 86 95 * to type <code>byte</code>. 87 96 */ 97 @Override 88 98 public final byte byteValue() 89 99 { … … 94 104 * Returns the value of the specified number as an <code>int</code>. 95 105 * This may involve rounding or truncation. This implementation simply 96 * casts the result of <code>doubleValue()</code>to <code>int</code>.106 * casts the result of {@link Rational#doubleValue} to <code>int</code>. 97 107 * 98 108 * @return the numeric value represented by this object after conversion 99 109 * to type <code>int</code>. 100 110 */ 111 @Override 101 112 public final int intValue() 102 113 { … … 107 118 * Returns the value of the specified number as a <code>long</code>. 108 119 * This may involve rounding or truncation. This implementation simply 109 * casts the result of <code>doubleValue()</code>to <code>long</code>.120 * casts the result of {@link Rational#doubleValue} to <code>long</code>. 110 121 * 111 122 * @return the numeric value represented by this object after conversion 112 123 * to type <code>long</code>. 113 124 */ 125 @Override 114 126 public final long longValue() 115 127 { … … 120 132 * Returns the value of the specified number as a <code>short</code>. 121 133 * This may involve rounding or truncation. This implementation simply 122 * casts the result of <code>doubleValue()</code>to <code>short</code>.134 * casts the result of {@link Rational#doubleValue} to <code>short</code>. 123 135 * 124 136 * @return the numeric value represented by this object after conversion 125 137 * to type <code>short</code>. 126 138 */ 139 @Override 127 140 public final short shortValue() 128 141 { … … 154 167 } 155 168 156 /** Checks if this rationalnumber is an Integer, either positive or negative. */169 /** Checks if this {@link Rational} number is an Integer, either positive or negative. */ 157 170 public boolean isInteger() 158 171 { … … 167 180 * @return a string representation of the object. 168 181 */ 182 @Override 169 183 @NotNull 170 184 public String toString() … … 173 187 } 174 188 175 /** Returns the simplest representation of this Rational's value possible. */189 /** Returns the simplest representation of this {@link Rational}'s value possible. */ 176 190 @NotNull 177 191 public String toSimpleString(boolean allowDecimal) … … 211 225 212 226 /** 213 * Compares two <code>Rational</code>instances, returning true if they are mathematically227 * Compares two {@link Rational} instances, returning true if they are mathematically 214 228 * equivalent. 215 229 * 216 * @param obj the Rationalto compare this instance to.230 * @param obj the {@link Rational} to compare this instance to. 217 231 * @return true if instances are mathematically equivalent, otherwise false. Will also 218 * return false if <code>obj</code> is not an instance of <code>Rational</code>.232 * return false if <code>obj</code> is not an instance of {@link Rational}. 219 233 */ 220 234 @Override … … 235 249 /** 236 250 * <p> 237 * Simplifies the Rationalnumber.</p>251 * Simplifies the {@link Rational} number.</p> 238 252 * <p> 239 253 * Prime number series: 1, 2, 3, 5, 7, 9, 11, 13, 17</p> … … 244 258 * <p> 245 259 * However, generating the prime number series seems to be a hefty task. Perhaps 246 * it's simpler to check if both d & n are divisible by all numbers from 2 ->260 * it's simpler to check if both d & n are divisible by all numbers from 2 {@literal ->} 247 261 * (Math.min(denominator, numerator) / 2). In doing this, one can check for 2 248 262 * and 5 once, then ignore all even numbers, and all numbers ending in 0 or 5. … … 250 264 * <p> 251 265 * Therefore, the max number of pairs of modulus divisions required will be:</p> 252 * < code><pre>266 * <pre><code> 253 267 * 4 Math.min(denominator, numerator) - 1 254 268 * -- * ------------------------------------ + 2 255 269 * 10 2 256 * <p/>270 * 257 271 * Math.min(denominator, numerator) - 1 258 272 * = ------------------------------------ + 2 259 273 * 5 260 * </ pre></code>274 * </code></pre> 261 275 * 262 276 * @return a simplified instance, or if the Rational could not be simplified, -
trunk/src/com/drew/lang/StringUtil.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 23 23 24 24 import com.drew.lang.annotations.NotNull; 25 import com.drew.lang.annotations.Nullable; 25 26 27 import java.io.BufferedReader; 28 import java.io.IOException; 29 import java.io.InputStream; 30 import java.io.InputStreamReader; 26 31 import java.util.Iterator; 27 32 28 /** @author Drew Noakes http://drewnoakes.com */ 33 /** 34 * @author Drew Noakes https://drewnoakes.com 35 */ 29 36 public class StringUtil 30 37 { 38 @NotNull 31 39 public static String join(@NotNull Iterable<? extends CharSequence> strings, @NotNull String delimiter) 32 40 { … … 50 58 } 51 59 60 @NotNull 52 61 public static <T extends CharSequence> String join(@NotNull T[] strings, @NotNull String delimiter) 53 62 { … … 69 78 return buffer.toString(); 70 79 } 80 81 @NotNull 82 public static String fromStream(@NotNull InputStream stream) throws IOException 83 { 84 BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); 85 StringBuilder sb = new StringBuilder(); 86 String line; 87 while ((line = reader.readLine()) != null) { 88 sb.append(line); 89 } 90 return sb.toString(); 91 } 92 93 public static int compare(@Nullable String s1, @Nullable String s2) 94 { 95 boolean null1 = s1 == null; 96 boolean null2 = s2 == null; 97 98 if (null1 && null2) { 99 return 0; 100 } else if (null1) { 101 return -1; 102 } else if (null2) { 103 return 1; 104 } else { 105 return s1.compareTo(s2); 106 } 107 } 108 109 @NotNull 110 public static String urlEncode(@NotNull String name) 111 { 112 // Sufficient for now, it seems 113 return name.replace(" ", "%20"); 114 } 71 115 } -
trunk/src/com/drew/lang/annotations/NotNull.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 23 23 24 24 /** 25 * @author Drew Noakes http://drewnoakes.com 25 * @author Drew Noakes https://drewnoakes.com 26 26 */ 27 27 public @interface NotNull -
trunk/src/com/drew/lang/annotations/Nullable.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 23 23 24 24 /** 25 * @author Drew Noakes http://drewnoakes.com 25 * @author Drew Noakes https://drewnoakes.com 26 26 */ 27 27 public @interface Nullable -
trunk/src/com/drew/lang/annotations/SuppressWarnings.java
r6127 r8132 16 16 * More information about this project is available at: 17 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21
Note:
See TracChangeset
for help on using the changeset viewer.