Home
last modified time | relevance | path

Searched refs:extension (Results 1 – 10 of 10) sorted by relevance

/libcore/luni/src/main/java/libcore/net/
DMimeUtils.java76 String extension = canonicalize(split[i]); in parseTypes() local
77 if (!allowedInMap(extension)) { in parseTypes()
79 "Invalid extension " + extension + " in: " + line); in parseTypes()
87 if (extension.endsWith("!")) { in parseTypes()
88 extension = extension.substring(0, extension.length() - 1); in parseTypes()
91 mimeTypeToExtensionMap.put(mimeType, extension); in parseTypes()
95 mimeTypeToExtensionMap.put(mimeType, extension); in parseTypes()
100 extensionToMimeTypeMap.put(extension, mimeType); in parseTypes()
145 public static String guessMimeTypeFromExtension(String extension) { in guessMimeTypeFromExtension() argument
146 if (!allowedInMap(extension)) { in guessMimeTypeFromExtension()
[all …]
Dandroid.mime.types31 # extension "xml" back to MIME type "text/xml".
/libcore/luni/src/test/java/libcore/libcore/net/
DMimeUtilsTest.java191 private static void assertMimeTypeFromExtension(String mimeType, String extension) { in assertMimeTypeFromExtension() argument
192 final String actual = MimeUtils.guessMimeTypeFromExtension(extension); in assertMimeTypeFromExtension()
194 fail("Expected " + mimeType + " but was " + actual + " for extension " + extension); in assertMimeTypeFromExtension()
198 private static void assertExtensionFromMimeType(String extension, String mimeType) { in assertExtensionFromMimeType() argument
200 if (!Objects.equals(extension, actual)) { in assertExtensionFromMimeType()
201 fail("Expected " + extension + " but was " + actual + " for type " + mimeType); in assertExtensionFromMimeType()
205 private static void assertBidirectional(String mimeType, String extension) { in assertBidirectional() argument
206 assertMimeTypeFromExtension(mimeType, extension); in assertBidirectional()
207 assertExtensionFromMimeType(extension, mimeType); in assertBidirectional()
/libcore/ojluni/src/main/java/java/text/
DPatternEntry.java56 appendQuoted(extension,toAddTo); in appendQuotedExtension()
102 return extension; in getExtension()
144 if (showExtension && extension.length() != 0) { in addToBuffer()
146 appendQuoted(extension,toAddTo); in addToBuffer()
190 StringBuffer extension) in PatternEntry() argument
194 this.extension = (extension.length() > 0) ? extension.toString() in PatternEntry()
305 String extension = ""; field in PatternEntry
DMergeCollation.java95 if (entry.extension.length() != 0) { in getPattern()
125 if (entry.extension.length() == 0) { in findLastWithNoExtension()
243 && newEntry.extension.equals(lastEntry.extension)) { in fixEntry()
284 newEntry.extension = excess + newEntry.extension; in fixEntry()
/libcore/luni/src/main/java/libcore/icu/
DICU.java200 for (String extension : extensions) { in localeFromIcuLocaleId()
202 if (extension.startsWith("attribute=")) { in localeFromIcuLocaleId()
203 String unicodeAttributeValues = extension.substring("attribute=".length()); in localeFromIcuLocaleId()
208 final int separatorIndex = extension.indexOf('='); in localeFromIcuLocaleId()
212 final String value = extension.substring(2); in localeFromIcuLocaleId()
213 final char extensionId = extension.charAt(0); in localeFromIcuLocaleId()
218 unicodeKeywordsMap.put(extension.substring(0, separatorIndex), in localeFromIcuLocaleId()
219 extension.substring(separatorIndex + 1)); in localeFromIcuLocaleId()
244 for (Entry<Character, String> extension : extensionsMap.entrySet()) { in localeFromIcuLocaleId()
245 builder.setExtension(extension.getKey(), extension.getValue()); in localeFromIcuLocaleId()
/libcore/ojluni/src/main/java/sun/util/locale/
DLocaleExtensions.java199 Extension extension = entry.getValue(); in toID() local
201 privuse = extension; in toID()
206 buf.append(extension); in toID()
DLanguageTag.java736 for (String extension : extensions) { in toString()
737 sb.append(SEP).append(extension); in toString()
/libcore/harmony-tests/src/test/resources/resources/
Dtest.rtf19 * file type based on its file extension.
Dtest.doc19 * file type based on its file extension.