Skip to content

Commit 9be7a20

Browse files
committed
Fix newlines issue (CRLF to LF)
Use `git diff -w` and `git blame -w`
1 parent 09d8f30 commit 9be7a20

20 files changed

+3622
-3622
lines changed

basics/src/main/java/com/itextpdf/basics/codec/CCITTG4Encoder.java

Lines changed: 596 additions & 596 deletions
Large diffs are not rendered by default.

basics/src/main/java/com/itextpdf/basics/codec/TIFFConstants.java

Lines changed: 910 additions & 910 deletions
Large diffs are not rendered by default.

basics/src/main/java/com/itextpdf/basics/codec/TIFFField.java

Lines changed: 487 additions & 487 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
package com.itextpdf.basics.font;
2-
3-
/**
4-
* Classes implementing this interface can create custom encodings or
5-
* replace existing ones. It is used in the context of <code>PdfEncoding</code>.
6-
* @author Paulo Soares
7-
*/
8-
public interface ExtraEncoding {
9-
10-
/**
11-
* Converts an Unicode string to a byte array according to some encoding.
12-
* @param text the Unicode string
13-
* @param encoding the requested encoding. It's mainly of use if the same class
14-
* supports more than one encoding.
15-
* @return the conversion or <CODE>null</CODE> if no conversion is supported
16-
*/
17-
public byte[] charToByte(String text, String encoding);
18-
19-
/**
20-
* Converts an Unicode char to a byte array according to some encoding.
21-
* @param char1 the Unicode char
22-
* @param encoding the requested encoding. It's mainly of use if the same class
23-
* supports more than one encoding.
24-
* @return the conversion or <CODE>null</CODE> if no conversion is supported
25-
*/
26-
public byte[] charToByte(char char1, String encoding);
27-
28-
/**
29-
* Converts a byte array to an Unicode string according to some encoding.
30-
* @param b the input byte array
31-
* @param encoding the requested encoding. It's mainly of use if the same class
32-
* supports more than one encoding.
33-
* @return the conversion or <CODE>null</CODE> if no conversion is supported
34-
*/
35-
public String byteToChar(byte b[], String encoding);
36-
}
1+
package com.itextpdf.basics.font;
2+
3+
/**
4+
* Classes implementing this interface can create custom encodings or
5+
* replace existing ones. It is used in the context of <code>PdfEncoding</code>.
6+
* @author Paulo Soares
7+
*/
8+
public interface ExtraEncoding {
9+
10+
/**
11+
* Converts an Unicode string to a byte array according to some encoding.
12+
* @param text the Unicode string
13+
* @param encoding the requested encoding. It's mainly of use if the same class
14+
* supports more than one encoding.
15+
* @return the conversion or <CODE>null</CODE> if no conversion is supported
16+
*/
17+
public byte[] charToByte(String text, String encoding);
18+
19+
/**
20+
* Converts an Unicode char to a byte array according to some encoding.
21+
* @param char1 the Unicode char
22+
* @param encoding the requested encoding. It's mainly of use if the same class
23+
* supports more than one encoding.
24+
* @return the conversion or <CODE>null</CODE> if no conversion is supported
25+
*/
26+
public byte[] charToByte(char char1, String encoding);
27+
28+
/**
29+
* Converts a byte array to an Unicode string according to some encoding.
30+
* @param b the input byte array
31+
* @param encoding the requested encoding. It's mainly of use if the same class
32+
* supports more than one encoding.
33+
* @return the conversion or <CODE>null</CODE> if no conversion is supported
34+
*/
35+
public String byteToChar(byte b[], String encoding);
36+
}
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
package com.itextpdf.basics.image;
2-
3-
import java.net.URL;
4-
5-
public class BmpImage extends RawImage {
6-
7-
private int size;
8-
private boolean noHeader;
9-
10-
protected BmpImage(URL url, boolean noHeader, int size) {
11-
super(url, BMP);
12-
this.noHeader = noHeader;
13-
this.size = size;
14-
}
15-
16-
protected BmpImage(byte[] bytes, boolean noHeader, int size) {
17-
super(bytes, BMP);
18-
this.noHeader = noHeader;
19-
this.size = size;
20-
}
21-
22-
public int getSize() {
23-
return size;
24-
}
25-
26-
public boolean isNoHeader() {
27-
return noHeader;
28-
}
1+
package com.itextpdf.basics.image;
2+
3+
import java.net.URL;
4+
5+
public class BmpImage extends RawImage {
6+
7+
private int size;
8+
private boolean noHeader;
9+
10+
protected BmpImage(URL url, boolean noHeader, int size) {
11+
super(url, BMP);
12+
this.noHeader = noHeader;
13+
this.size = size;
14+
}
15+
16+
protected BmpImage(byte[] bytes, boolean noHeader, int size) {
17+
super(bytes, BMP);
18+
this.noHeader = noHeader;
19+
this.size = size;
20+
}
21+
22+
public int getSize() {
23+
return size;
24+
}
25+
26+
public boolean isNoHeader() {
27+
return noHeader;
28+
}
2929
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
package com.itextpdf.basics.image;
2-
3-
import java.net.URL;
4-
5-
public class JpegImage extends Image {
6-
7-
protected JpegImage(URL url) {
8-
super(url, JPEG);
9-
}
10-
11-
protected JpegImage(byte[] bytes) {
12-
super(bytes, JPEG);
13-
}
14-
}
1+
package com.itextpdf.basics.image;
2+
3+
import java.net.URL;
4+
5+
public class JpegImage extends Image {
6+
7+
protected JpegImage(URL url) {
8+
super(url, JPEG);
9+
}
10+
11+
protected JpegImage(byte[] bytes) {
12+
super(bytes, JPEG);
13+
}
14+
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
package com.itextpdf.basics.image;
2-
3-
import java.net.URL;
4-
5-
public class PngImage extends RawImage {
6-
7-
protected PngImage(byte[] bytes) {
8-
super(bytes, PNG);
9-
}
10-
11-
protected PngImage(URL url) {
12-
super(url, PNG);
13-
}
14-
}
1+
package com.itextpdf.basics.image;
2+
3+
import java.net.URL;
4+
5+
public class PngImage extends RawImage {
6+
7+
protected PngImage(byte[] bytes) {
8+
super(bytes, PNG);
9+
}
10+
11+
protected PngImage(URL url) {
12+
super(url, PNG);
13+
}
14+
}
Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
package com.itextpdf.basics.io;
2-
3-
import java.io.IOException;
4-
5-
/**
6-
* A RandomAccessSource that is based on an underlying byte array
7-
*/
8-
class ArrayRandomAccessSource implements RandomAccessSource {
9-
private byte[] array;
10-
11-
public ArrayRandomAccessSource(byte[] array) {
12-
if(array == null) throw new NullPointerException();
13-
this.array = array;
14-
}
15-
16-
public int get(long offset) {
17-
if (offset >= array.length) return -1;
18-
return 0xff & array[(int)offset];
19-
}
20-
21-
public int get(long offset, byte[] bytes, int off, int len) {
22-
if (array == null) throw new IllegalStateException("Already closed");
23-
24-
if (offset >= array.length)
25-
return -1;
26-
27-
if (offset + len > array.length)
28-
len = (int)(array.length - offset);
29-
30-
System.arraycopy(array, (int)offset, bytes, off, len);
31-
32-
return len;
33-
}
34-
35-
public long length() {
36-
return array.length;
37-
}
38-
39-
public void close() throws IOException {
40-
array = null;
41-
}
42-
}
1+
package com.itextpdf.basics.io;
2+
3+
import java.io.IOException;
4+
5+
/**
6+
* A RandomAccessSource that is based on an underlying byte array
7+
*/
8+
class ArrayRandomAccessSource implements RandomAccessSource {
9+
private byte[] array;
10+
11+
public ArrayRandomAccessSource(byte[] array) {
12+
if(array == null) throw new NullPointerException();
13+
this.array = array;
14+
}
15+
16+
public int get(long offset) {
17+
if (offset >= array.length) return -1;
18+
return 0xff & array[(int)offset];
19+
}
20+
21+
public int get(long offset, byte[] bytes, int off, int len) {
22+
if (array == null) throw new IllegalStateException("Already closed");
23+
24+
if (offset >= array.length)
25+
return -1;
26+
27+
if (offset + len > array.length)
28+
len = (int)(array.length - offset);
29+
30+
System.arraycopy(array, (int)offset, bytes, off, len);
31+
32+
return len;
33+
}
34+
35+
public long length() {
36+
return array.length;
37+
}
38+
39+
public void close() throws IOException {
40+
array = null;
41+
}
42+
}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
package com.itextpdf.basics.io;
2-
3-
public class ByteArrayOutputStream extends java.io.ByteArrayOutputStream {
4-
5-
public ByteArrayOutputStream() {
6-
super();
7-
}
8-
9-
public ByteArrayOutputStream(int size) {
10-
super(size);
11-
}
12-
13-
public void assignBytes(byte[] bytes, int count) {
14-
buf = bytes;
15-
this.count = count;
16-
}
17-
18-
}
1+
package com.itextpdf.basics.io;
2+
3+
public class ByteArrayOutputStream extends java.io.ByteArrayOutputStream {
4+
5+
public ByteArrayOutputStream() {
6+
super();
7+
}
8+
9+
public ByteArrayOutputStream(int size) {
10+
super(size);
11+
}
12+
13+
public void assignBytes(byte[] bytes, int count) {
14+
buf = bytes;
15+
this.count = count;
16+
}
17+
18+
}

0 commit comments

Comments
 (0)