Skip to content
Permalink
Browse files
Merge pull request #62 from arturobernalg/feature/FILEUPLOAD-314
FILEUPLOAD-314 - Replace C-style array declaration for java
  • Loading branch information
jochenw committed Apr 26, 2021
2 parents 6642724 + 0635758 commit e25b70889f2f0d8563f90f50bdc388d2536b3cc8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
@@ -183,6 +183,10 @@
<name>Merbin J Anselm</name>
<email>merbinjanselm@gmail.com</email>
</contributor>
<contributor>
<name>Arturo Bernal</name>
<email>arturobernalg@gmail.com</email>
</contributor>
</contributors>

<scm>
@@ -222,36 +222,36 @@ protected FileItemFactory createFactory(final File repository) {

static final String CHARSET_WIN1251 = "Cp1251";

static final int SWISS_GERMAN_STUFF_UNICODE [] = {
static final int[] SWISS_GERMAN_STUFF_UNICODE = {
0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4
};

static final int SWISS_GERMAN_STUFF_ISO8859_1 [] = {
static final int[] SWISS_GERMAN_STUFF_ISO8859_1 = {
0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4
};

static final int SWISS_GERMAN_STUFF_UTF8 [] = {
static final int[] SWISS_GERMAN_STUFF_UTF8 = {
0x47, 0x72, 0xC3, 0xBC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xC3, 0xA4,
0x6D, 0xC3, 0xA4
};

static final int RUSSIAN_STUFF_UNICODE [] = {
static final int[] RUSSIAN_STUFF_UNICODE = {
0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438,
0x432, 0x435, 0x442
};

static final int RUSSIAN_STUFF_UTF8 [] = {
static final int[] RUSSIAN_STUFF_UTF8 = {
0xD0, 0x92, 0xD1, 0x81, 0xD0, 0xB5, 0xD0, 0xBC, 0x5F,
0xD0, 0xBF, 0xD1, 0x80, 0xD0, 0xB8, 0xD0, 0xB2, 0xD0,
0xB5, 0xD1, 0x82
};

static final int RUSSIAN_STUFF_KOI8R [] = {
static final int[] RUSSIAN_STUFF_KOI8R = {
0xF7, 0xD3, 0xC5, 0xCD, 0x5F, 0xD0, 0xD2, 0xC9, 0xD7,
0xC5, 0xD4
};

static final int RUSSIAN_STUFF_WIN1251 [] = {
static final int[] RUSSIAN_STUFF_WIN1251 = {
0xC2, 0xF1, 0xE5, 0xEC, 0x5F, 0xEF, 0xF0, 0xE8, 0xE2,
0xE5, 0xF2
};
@@ -556,7 +556,7 @@ public int read() throws IOException {
}

@Override
public int read(final byte b[], final int off, final int len) throws IOException {
public int read(final byte[] b, final int off, final int len) throws IOException {
if (readLimit > 0) {
return in.read(b, off, Math.min(readLimit, len));
}
@@ -139,7 +139,7 @@ public int read()
return bais.read();
}
@Override
public int read(final byte b[], final int off, final int len) throws IOException
public int read(final byte[] b, final int off, final int len) throws IOException
{
return bais.read(b, off, Math.min(len, 3));
}
@@ -560,7 +560,7 @@ public int read() throws IOException {
}

@Override
public int read(final byte b[], final int off, final int len) throws IOException {
public int read(final byte[] b, final int off, final int len) throws IOException {
if (readLimit > 0) {
return in.read(b, off, Math.min(readLimit, len));
}

0 comments on commit e25b708

Please sign in to comment.