/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
throws IOException {
if (isPlainText(content)) {
return DEFAULT_INSTANCE;
} else {
return null;
}
}
/**
* Check whether the byte array contains plain text. First, check
* assuming US-ASCII encoding. Then, if unsuccessful, try to
* strip away Unicode byte-order marks and try again.
*/
if (isPlainText(ascii)) {
return true;
}
}
/**
* Check whether the string only contains plain ASCII characters.
*/
if ((b >= 32 && b < 127) || // ASCII printable characters
(b == 9) || // horizontal tab
(b == 10) || // line feed
(b == 12) || // form feed
(b == 13)) { // carriage return
// is plain text so far, go to next byte
continue;
} else {
// 8-bit values or unprintable control characters,
// probably not plain text
return false;
}
}
return true;
}
};
new PlainAnalyzerFactory();
private PlainAnalyzerFactory() {
}
return new PlainAnalyzer(this);
}
public void writeXref(Reader in, Writer out, Definitions defs, Annotation annotation, Project project)
throws IOException
{
}
}