Skip to content

Commit c388d20

Browse files
author
Niall Pemberton
committed
Change the visibility of the *utility* methods from private to package (so that the XmlStreamReaderUtilitiesTest can also be run against the "compatibility" version of XmlStreamReader)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1004854 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3fb12de commit c388d20

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ private void prepareReader(InputStream is, String encoding)
434434
}
435435

436436
// InputStream is passed for XmlStreamReaderException creation only
437-
private String calculateRawEncoding(String bomEnc, String xmlGuessEnc,
437+
String calculateRawEncoding(String bomEnc, String xmlGuessEnc,
438438
String xmlEnc, InputStream is) throws IOException {
439439
String encoding;
440440
if (bomEnc == null) {
@@ -480,7 +480,7 @@ private String calculateRawEncoding(String bomEnc, String xmlGuessEnc,
480480
}
481481

482482
// InputStream is passed for XmlStreamReaderException creation only
483-
private String calculateHttpEncoding(String cTMime, String cTEnc,
483+
String calculateHttpEncoding(String cTMime, String cTEnc,
484484
String bomEnc, String xmlGuessEnc, String xmlEnc, InputStream is,
485485
boolean lenient) throws IOException {
486486
String encoding;
@@ -527,7 +527,7 @@ private String calculateHttpEncoding(String cTMime, String cTEnc,
527527
}
528528

529529
// returns MIME type or NULL if httpContentType is NULL
530-
private static String getContentTypeMime(String httpContentType) {
530+
static String getContentTypeMime(String httpContentType) {
531531
String mime = null;
532532
if (httpContentType != null) {
533533
int i = httpContentType.indexOf(";");
@@ -542,7 +542,7 @@ private static String getContentTypeMime(String httpContentType) {
542542

543543
// returns charset parameter value, NULL if not present, NULL if
544544
// httpContentType is NULL
545-
private static String getContentTypeEncoding(String httpContentType) {
545+
static String getContentTypeEncoding(String httpContentType) {
546546
String encoding = null;
547547
if (httpContentType != null) {
548548
int i = httpContentType.indexOf(";");
@@ -558,7 +558,7 @@ private static String getContentTypeEncoding(String httpContentType) {
558558

559559
// returns the BOM in the stream, NULL if not present,
560560
// if there was BOM the in the stream it is consumed
561-
private static String getBOMEncoding(BufferedInputStream is)
561+
static String getBOMEncoding(BufferedInputStream is)
562562
throws IOException {
563563
String encoding = null;
564564
int[] bytes = new int[3];
@@ -668,7 +668,7 @@ private static String getXmlProlog(BufferedInputStream is, String guessedEnc)
668668
}
669669

670670
// indicates if the MIME type belongs to the APPLICATION XML family
671-
private static boolean isAppXml(String mime) {
671+
static boolean isAppXml(String mime) {
672672
return mime != null
673673
&& (mime.equals("application/xml")
674674
|| mime.equals("application/xml-dtd")
@@ -678,7 +678,7 @@ private static boolean isAppXml(String mime) {
678678
}
679679

680680
// indicates if the MIME type belongs to the TEXT XML family
681-
private static boolean isTextXml(String mime) {
681+
static boolean isTextXml(String mime) {
682682
return mime != null
683683
&& (mime.equals("text/xml")
684684
|| mime.equals("text/xml-external-parsed-entity") || (mime

0 commit comments

Comments
 (0)