{"id":277200,"date":"2016-03-29T15:03:05","date_gmt":"2016-03-29T11:03:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277200"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277200","title":{"rendered":"\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 ClassLoader.getResourceAsStream"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f17\/6ea\/a03\/f176eaa03305493d871870040b054a84.png\" alt=\"image\"\/><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 ClassLoader.getResourceAsStream() \u0432 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c 1432ms \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0430\u0441\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h3>\n<p>  \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0441\u0430\u043c\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435, \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0435\u0441\u0442\u044c \u0432 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.amazon.kindle\">Amazon\u2019s Kindle<\/a> \u0441 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 100,000,000 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0439 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043c\u0435\u043b\u043a\u0438\u043c\u0438 \u0441 \u043f\u0430\u0440\u043e\u0439 \u0441\u043e\u0442\u0435\u043d \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0435\u043b\u0444\u0438: <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.linecorp.b612.android\">B612 \u2014 Selfie from the heart<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e06\/3e4\/f4a\/e063e4f4a7444fa89be59f27d0250907.png\" alt=\"image\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0442\u0443\u0442 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c 771ms, \u0447\u0442\u043e \u0442\u043e\u0436\u0435 \u043d\u0435 \u043c\u0430\u043b\u043e, \u043d\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c 1432ms.<\/p>\n<p>  \u0415\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u043b\u0438\u043a\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430.<br \/>  (\u0414\u043b\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 <a href=\"https:\/\/nimbledroid.com\/\"><a href=\"https:\/\/nimbledroid.com\">https:\/\/nimbledroid.com<\/a><\/a>)  <\/p>\n<table>\n<thead>\n<tr>\n<th>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/th>\n<th>\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f getResourceAsStream()<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.yahoo.mobile.client.android.fantasyfootball\">Yahoo Fantasy Sports<\/a><\/td>\n<td><a href=\"https:\/\/nimbledroid.com\/play\/com.yahoo.mobile.client.android.fantasyfootball?p=2DH2RIaB5laac7#Icicle%20Graph\">2166ms<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.timehop\">Timehop<\/a><\/td>\n<td><a href=\"https:\/\/nimbledroid.com\/play\/com.timehop?p=2DGvNGHPt4RT7M#Icicle%20Graph\">1538ms<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.audible.application\">Audiobooks from Audible<\/a><\/td>\n<td><a href=\"https:\/\/nimbledroid.com\/play\/com.audible.application?p=2ykMPeQdcgf9C6#Icicle%20Graph\">1527ms<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.nike.plusgps\">Nike+ Running<\/a><\/td>\n<td><a href=\"https:\/\/nimbledroid.com\/play\/com.nike.plusgps?p=2L8gQfE5v08CUl#Icicle%20Graph\">1432ms<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.booking\">Booking.com Hotel Reservations<\/a><\/td>\n<td><a href=\"https:\/\/nimbledroid.com\/play\/com.booking?p=2LAevyLAo1Ej3X#Icicle%20Graph\">497ms<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u0418 \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 Call Stack \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  <a href=\"https:\/\/nimbledroid.com\/play\/jp.naver.line.android?p=2ym4cYt4JpnU17#Icicle%20Graph\">LINE: Free Calls &amp; Messages<\/a>:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1c8\/e58\/9bc\/1c8e589bcb694810870c1d3089f9c35e.png\" alt=\"image\"\/><br \/>  \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0432\u044b\u0437\u043e\u0432 getResourceAsStream \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u041d\u0415 \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Line \u0437\u043d\u0430\u044e\u0442 \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439.<\/p>\n<p>  <a href=\"https:\/\/nimbledroid.com\/play\/com.yahoo.mobile.client.android.fantasyfootball?p=2DH2RIaB5laac7#Icicle%20Graph\">Yahoo Fantasy Sports<\/a>:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/dea\/d64\/b7a\/dead64b7a5d44acfa46b01cb364a7dc5.png\" alt=\"image\"\/><br \/>  \u0412\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"http:\/\/www.joda.org\/joda-time\/\">JodaTime<\/a><\/p>\n<p>  <a href=\"https:\/\/nimbledroid.com\/play\/com.audible.application?p=2ykMPeQdcgf9C6#Icicle%20Graph\">Audiobooks from Audible<\/a><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/18c\/565\/ffc\/18c565ffcaed4845b95b64d555d03592.png\" alt=\"image\"\/><br \/>  \u0412\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"http:\/\/logback.qos.ch\/\">Logback<\/a><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0432\u044b\u0437\u043e\u0432 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u0438 SDK, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 Jar \u0444\u0430\u0439\u043b\u043e\u0432. \u042d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043d\u0430 Android, \u0438 \u0432 \u043c\u0438\u0440\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 Java. \u041c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 Android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u043c\u0435\u044f Java \u043e\u043f\u044b\u0442 \u0438, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0435 \u0437\u043d\u0430\u044f \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u044e\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0443\u043c\u0430\u044e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0437\u043d\u0430\u044e\u0442, \u0431\u044b\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 stackoverflow: <a href=\"http:\/\/stackoverflow.com\/questions\/5059663\/android-java-joda-date-is-slow\">Android Java \u2014 Joda Date is slow<\/a> <br \/>  \u0412 \u0434\u0430\u043b\u0435\u043a\u043e\u043c 2013 \u0433\u043e\u0434\u0443 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442: <a href=\"http:\/\/blog.danlew.net\/2013\/08\/20\/joda_time_s_memory_issue_in_android\/\"><a href=\"http:\/\/blog.danlew.net\/2013\/08\/20\/joda_time_s_memory_issue_in_android\/\">http:\/\/blog.danlew.net\/2013\/08\/20\/joda_time_s_memory_issue_in_android\/<\/a><\/a> \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/dlew\/joda-time-android\"><a href=\"https:\/\/github.com\/dlew\/joda-time-android\">https:\/\/github.com\/dlew\/joda-time-android<\/a><\/a>.<\/p>\n<p>  <strong>\u041d\u041e<\/strong>   <\/p>\n<ol>\n<li>\u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e JodaTime. <\/li>\n<li>\u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 SDK \u0441 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. <\/li>\n<\/ol>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044f\u0441\u043d\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0447\u0435\u043c \u0435\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0430.<\/p>\n<p>  <\/p>\n<h3>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h3>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Android.<br \/>  \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u0433\u0434\u0435 \u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c AOSP \u0438 \u0442.\u0434., \u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u043a \u0434\u0435\u043b\u0443, \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0432\u0441\u0435 \u0436\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043c\u043e\u0439 \u043f\u0443\u0442\u044c, \u043d\u0430\u0447\u0438\u043d\u0430\u0439\u0442\u0435 \u043e\u0442\u0441\u044e\u0434\u0430: <a href=\"https:\/\/source.android.com\/\"><a href=\"https:\/\/source.android.com\/\">https:\/\/source.android.com\/<\/a><\/a><\/p>\n<p>  \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0442\u043a\u0443 <strong>android-6.0.1_r11<\/strong><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r11\/libart\/src\/main\/java\/java\/lang\/ClassLoader.java?autodive=0%2F\">libcore\/libart\/src\/main\/java\/java\/lang\/ClassLoader.java<\/a> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u0434 getResourceAsStream:  <\/p>\n<pre><code class=\"java\">public InputStream getResourceAsStream(String resName) {     try {         URL url = getResource(resName);         if (url != null) {             return url.openStream();         }     } catch (IOException ex) {         \/\/ Don't want to see the exception.     }      return null; }<\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0443\u0442\u044c \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443, \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 null, \u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 openStream(), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0441\u0442\u044c \u0432 java.net.URL<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e getResource():  <\/p>\n<pre><code class=\"java\">public URL getResource(String resName) {     URL resource = parent.getResource(resName);     if (resource == null) {         resource = findResource(resName);     }     return resource; }<\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0435\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, findResource():  <\/p>\n<pre><code class=\"java\">protected URL findResource(String resName) {     return null; }<\/code><\/pre>\n<p>  \u041e\u043a, \u0442\u043e \u0435\u0441\u0442\u044c findResource() \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d. ClassLoader \u044d\u0442\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438, \u043a\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445. \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e: <a href=\"http:\/\/developer.android.com\/reference\/java\/lang\/ClassLoader.html\"><a href=\"http:\/\/developer.android.com\/reference\/java\/lang\/ClassLoader.html\">http:\/\/developer.android.com\/reference\/java\/lang\/ClassLoader.html<\/a><\/a>, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c: <strong>Android provides several concrete implementations of the class, with PathClassLoader being the one typically used.<\/strong>.<\/p>\n<p>  \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u043e\u0431\u0440\u0430\u043b AOSP, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0432 getResourceAsStream() \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"java\">public InputStream getResourceAsStream(String resName) {   try {       Logger.getLogger(&quot;RESEARCH&quot;).info(&quot;this: &quot; + this);       URL url = getResource(resName);       if (url != null) {           return url.openStream();       }       ...<\/code><\/pre>\n<p>  \u042f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u043e, \u0447\u0442\u043e \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u2014 <strong>dalvik.system.PathClassLoader<\/strong>, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 <strong>PathClassLoader<\/strong>, \u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <strong>findResource()<\/strong>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 <strong>findResource()<\/strong> \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u2014 <strong>BaseDexClassLoader<\/strong>.<br \/>  <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r11\/dalvik\/src\/main\/java\/dalvik\/system\/BaseDexClassLoader.java\">\/libcore\/dalvik\/src\/main\/java\/dalvik\/system\/BaseDexClassLoader.java<\/a>:  <\/p>\n<pre><code class=\"java\">@Override protected URL findResource(String name) {     return pathList.findResource(name); }<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0439\u0434\u0435\u043c <strong>pathList<\/strong> (\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e):  <\/p>\n<pre><code class=\"java\">public class BaseDexClassLoader extends ClassLoader {   private final DexPathList pathList;    \/**    * Constructs an instance.    *    * @param dexPath the list of jar\/apk files containing classes and    * resources, delimited by {@code File.pathSeparator}, which    * defaults to {@code &quot;:&quot;} on Android    * @param optimizedDirectory directory where optimized dex files    * should be written; may be {@code null}    * @param libraryPath the list of directories containing native    * libraries, delimited by {@code File.pathSeparator}; may be    * {@code null}    * @param parent the parent class loader    *\/   public BaseDexClassLoader(String dexPath, File optimizedDirectory,           String libraryPath, ClassLoader parent) {       super(parent);       this.pathList = new DexPathList(this, dexPath, libraryPath, optimizedDirectory);   }<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u044d\u0442\u043e\u0442 <strong>DexPathList<\/strong>.<br \/>  <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r11\/dalvik\/src\/main\/java\/dalvik\/system\/DexPathList.java\">libcore\/dalvik\/src\/main\/java\/dalvik\/system\/DexPathList.java<\/a>:  <\/p>\n<pre><code class=\"java\">\/**  * A pair of lists of entries, associated with a {@code ClassLoader}.  * One of the lists is a dex\/resource path &amp;mdash; typically referred  * to as a &quot;class path&quot; &amp;mdash; list, and the other names directories  * containing native code libraries. Class path entries may be any of:  * a {@code .jar} or {@code .zip} file containing an optional  * top-level {@code classes.dex} file as well as arbitrary resources,  * or a plain {@code .dex} file (with no possibility of associated  * resources).  *  * &lt;p&gt;This class also contains methods to use these lists to look up  * classes and resources.&lt;\/p&gt;  *\/ \/*package*\/ final class DexPathList {<\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0435\u0442\u0441\u044f \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430.   <\/p>\n<pre><code class=\"java\">\/**  * Finds the named resource in one of the zip\/jar files pointed at  * by this instance. This will find the one in the earliest listed  * path element.  *  * @return a URL to the named resource or {@code null} if the  * resource is not found in any of the zip\/jar files  *\/ public URL findResource(String name) {     for (Element element : dexElements) {         URL url = element.findResource(name);         if (url != null) {             return url;         }     }      return null; }<\/code><\/pre>\n<p>  <strong>Element<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u0432 <strong>DexPathList<\/strong>. \u0418 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"java\">public URL findResource(String name) {   maybeInit();    \/\/ We support directories so we can run tests and\/or legacy code   \/\/ that uses Class.getResource.   if (isDirectory) {       File resourceFile = new File(dir, name);       if (resourceFile.exists()) {           try {               return resourceFile.toURI().toURL();           } catch (MalformedURLException ex) {               throw new RuntimeException(ex);           }       }   }    if (zipFile == null || zipFile.getEntry(name) == null) {       \/*        * Either this element has no zip\/jar file (first        * clause), or the zip\/jar file doesn't have an entry        * for the given name (second clause).        *\/       return null;   }    try {       \/*        * File.toURL() is compliant with RFC 1738 in        * always creating absolute path names. If we        * construct the URL by concatenating strings, we        * might end up with illegal URLs for relative        * names.        *\/       return new URL(&quot;jar:&quot; + zip.toURL() + &quot;!\/&quot; + name);   } catch (MalformedURLException ex) {       throw new RuntimeException(ex);   } }<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f. \u041a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, APK \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e zip \u0444\u0430\u0439\u043b. \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c:  <\/p>\n<pre><code class=\"java\">if (zipFile == null || zipFile.getEntry(name) == null) {<\/code><\/pre>\n<p>  \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0430\u0439\u0442\u0438 ZipEntry \u043f\u043e \u0438\u043c\u0435\u043d\u0438, \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c java.net.URL. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <strong>getEntry<\/strong>, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e LinkedHashMap:<\/p>\n<p>  <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r11\/luni\/src\/main\/java\/java\/util\/zip\/ZipFile.java\">\/libcore\/luni\/src\/main\/java\/java\/util\/zip\/ZipFile.java<\/a>:  <\/p>\n<pre><code class=\"java\">...   private final LinkedHashMap&lt;String, ZipEntry&gt; entries = new LinkedHashMap&lt;String, ZipEntry&gt;();   ...   public ZipEntry getEntry(String entryName) {       checkNotClosed();       if (entryName == null) {           throw new NullPointerException(&quot;entryName == null&quot;);       }        ZipEntry ze = entries.get(entryName);       if (ze == null) {           ze = entries.get(entryName + &quot;\/&quot;);       }       return ze;   }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043d\u0435 \u0441\u0443\u043f\u0435\u0440 \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u043d\u043e \u043e\u043d\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  \u041c\u044b \u0443\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043e\u0434\u043d\u0443 \u0432\u0435\u0449\u044c: \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Zip \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u0445. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <strong>DexPathList.Element.findResource()<\/strong>, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u044b\u0437\u043e\u0432 <strong>maybeInit();<\/strong>. <br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0435\u0433\u043e:  <\/p>\n<pre><code class=\"java\">public synchronized void maybeInit() {   if (initialized) {       return;   }    initialized = true;    if (isDirectory || zip == null) {       return;   }    try {       zipFile = new ZipFile(zip);   } catch (IOException ioe) {       \/*        * Note: ZipException (a subclass of IOException)        * might get thrown by the ZipFile constructor        * (e.g. if the file isn't actually a zip\/jar        * file).        *\/       System.logE(&quot;Unable to open zip file: &quot; + zip, ioe);       zipFile = null;   } }<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043e\u043d\u043e! \u042d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430:  <\/p>\n<pre><code class=\"java\">zipFile = new ZipFile(zip);<\/code><\/pre>\n<p>  \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 zip \u0444\u0430\u0439\u043b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435.  <\/p>\n<pre><code class=\"java\">public ZipFile(File file) throws ZipException, IOException {     this(file, OPEN_READ); }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u0442\u0443\u0442 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c <strong>entries<\/strong> LinkedHashMap. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 zip \u0444\u0430\u0439\u043b, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0435\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435. \u0418\u0437-\u0437\u0430 \u0444\u043b\u0430\u0433\u0430 <strong>initialized<\/strong> \u043c\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c zip \u0444\u0430\u0439\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u044d\u0442\u043e \u043e\u0431\u044c\u044f\u0441\u043d\u044f\u0435\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 Zip \u0444\u0430\u0439\u043b\u0430, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438:<br \/>  <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r21\/luni\/src\/main\/java\/java\/util\/zip\/ZipFile.java\"><a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r21\/luni\/src\/main\/java\/java\/util\/zip\/ZipFile.java\">https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r21\/luni\/src\/main\/java\/java\/util\/zip\/ZipFile.java<\/a><\/a><\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e! \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e.<br \/>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043f\u043e\u043a\u0430 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c:  <\/p>\n<pre><code class=\"java\">URL url = getResource(resName);<\/code><\/pre>\n<p>  \u041d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434 getResourceAsStream \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"java\">public InputStream getResourceAsStream(String resName) {   try {       long start;       long end;        start = System.currentTimeMillis();       URL url = getResource(resName);       end = System.currentTimeMillis();       Logger.getLogger(&quot;RESEARCH&quot;).info(&quot;getResource: &quot; + (end - start));        if (url != null) {           start = System.currentTimeMillis();           InputStream inputStream = url.openStream();           end = System.currentTimeMillis();           Logger.getLogger(&quot;RESEARCH&quot;).info(&quot;url.openStream: &quot; + (end - start));            return inputStream;       }       ...<\/code><\/pre>\n<p>  \u0441\u043e\u0431\u0435\u0440\u0435\u043c AOSP \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e <strong>url.openStream() \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c getResource()<\/strong>.<\/p>\n<p>  <\/p>\n<h3>url.openStream()<\/h3>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u043e\u043f\u0443\u0449\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b. \u0415\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043e\u0442 <strong>url.openStream()<\/strong>, \u0442\u043e \u043c\u044b \u043f\u043e\u043f\u0430\u0434\u0435\u043c \u0432 <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r11\/luni\/src\/main\/java\/libcore\/net\/url\/JarURLConnectionImpl.java\">\/libcore\/luni\/src\/main\/java\/libcore\/net\/url\/JarURLConnectionImpl.java<\/a>:  <\/p>\n<pre><code class=\"java\">@Override public InputStream getInputStream() throws IOException {     if (closed) {         throw new IllegalStateException(&quot;JarURLConnection InputStream has been closed&quot;);     }     connect();     if (jarInput != null) {         return jarInput;     }     if (jarEntry == null) {         throw new IOException(&quot;Jar entry not specified&quot;);     }     return jarInput = new JarURLConnectionInputStream(jarFile             .getInputStream(jarEntry), jarFile); }<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <strong>connect()<\/strong>:  <\/p>\n<pre><code class=\"java\">@Override public void connect() throws IOException {     if (!connected) {         findJarFile(); \/\/ ensure the file can be found         findJarEntry(); \/\/ ensure the entry, if any, can be found         connected = true;     } }<\/code><\/pre>\n<p>  \u041d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, we need to go deeper \ud83d\ude42  <\/p>\n<pre><code class=\"java\">private void findJarFile() throws IOException {     if (getUseCaches()) {         synchronized (jarCache) {             jarFile = jarCache.get(jarFileURL);         }         if (jarFile == null) {             JarFile jar = openJarFile();             synchronized (jarCache) {                 jarFile = jarCache.get(jarFileURL);                 if (jarFile == null) {                     jarCache.put(jarFileURL, jar);                     jarFile = jar;                 } else {                     jar.close();                 }             }         }     } else {         jarFile = openJarFile();     }      if (jarFile == null) {         throw new IOException();     } }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438 \u0442\u0443\u0442 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f. <strong>getUseCaches()<\/strong> \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043d\u0430\u0441 \u043a   <\/p>\n<pre><code class=\"java\">public abstract class URLConnection {   ...    private static boolean defaultUseCaches = true;   ...<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 cache:  <\/p>\n<pre><code class=\"java\">private static final HashMap&lt;URL, JarFile&gt; jarCache = new HashMap&lt;URL, JarFile&gt;(); <\/code><\/pre>\n<p>  <strong>\u0422\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438!<\/strong> Zip \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043d\u043e\u0432\u0430! \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 40mb \ud83d\ude42<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <strong>openJarFile()<\/strong>:  <\/p>\n<pre><code class=\"java\">private JarFile openJarFile() throws IOException {   if (jarFileURL.getProtocol().equals(&quot;file&quot;)) {       String decodedFile = UriCodec.decode(jarFileURL.getFile());       return new JarFile(new File(decodedFile), true, ZipFile.OPEN_READ);   } else {     ...<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u041d\u0415 <strong>ZipFile<\/strong>, \u0430 <strong>JarFile<\/strong>. JarFile \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a ZipFile, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442:  <\/p>\n<pre><code class=\"java\">\/**  * Create a new {@code JarFile} using the contents of file.  *  * @param file  *            the JAR file as {@link File}.  * @param verify  *            if this JAR filed is signed whether it must be verified.  * @param mode  *            the mode to use, either {@link ZipFile#OPEN_READ OPEN_READ} or  *            {@link ZipFile#OPEN_DELETE OPEN_DELETE}.  * @throws IOException  *             If the file cannot be read.  *\/ public JarFile(File file, boolean verify, int mode) throws IOException {     super(file, mode);      \/\/ Step 1: Scan the central directory for meta entries (MANIFEST.mf     \/\/ &amp; possibly the signature files) and read them fully.     HashMap&lt;String, byte[]&gt; metaEntries = readMetaEntries(this, verify);      \/\/ Step 2: Construct a verifier with the information we have.     \/\/ Verification is possible *only* if the JAR file contains a manifest     \/\/ *AND* it contains signing related information (signature block     \/\/ files and the signature files).     \/\/     \/\/ TODO: Is this really the behaviour we want if verify == true ?     \/\/ We silently skip verification for files that have no manifest or     \/\/ no signatures.     if (verify &amp;&amp; metaEntries.containsKey(MANIFEST_NAME) &amp;&amp;             metaEntries.size() &gt; 1) {         \/\/ We create the manifest straight away, so that we can create         \/\/ the jar verifier as well.         manifest = new Manifest(metaEntries.get(MANIFEST_NAME), true);         verifier = new JarVerifier(getName(), manifest, metaEntries);     } else {         verifier = null;         manifestBytes = metaEntries.get(MANIFEST_NAME);     } }<\/code><\/pre>\n<p>  \u0410\u0433\u0430, \u0432\u043e\u0442 \u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430! \u041a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, APK \u0444\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d, \u0438 \u043a\u043b\u0430\u0441\u0441 <strong>JarFile<\/strong> \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442.<\/p>\n<p>  \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0442\u0443\u0442: <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r21\/luni\/src\/main\/java\/java\/util\/jar\/\"><a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r21\/luni\/src\/main\/java\/java\/util\/jar\/\">https:\/\/android.googlesource.com\/platform\/libcore\/+\/android-6.0.1_r21\/luni\/src\/main\/java\/java\/util\/jar\/<\/a><\/a>.<\/p>\n<p>  <strong>\u041d\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u0430\u043a \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. <\/strong><\/p>\n<p>  <\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u041a\u043e\u0433\u0434\u0430 ClassLoader.getResourceAsStream() \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, APK \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a zip \u0444\u0430\u0439\u043b, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437, \u043d\u043e \u0443\u0436\u0435 \u0441 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c InputStream. \u042d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044c\u044f\u0441\u043d\u044f\u0435\u0442, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u0437\u043e\u0432\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 APK \u0444\u0430\u0439\u043b\u0430 \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438!<\/p>\n<p>  <\/p>\n<h3>One more thing<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0432 nimbledroid \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong><a href=\"https:\/\/nimbledroid.com\/play\/com.yahoo.mobile.client.android.fantasyfootball?p=2DH2RIaB5laac7#Icicle%20Graph\">Full Stack Trace<\/a><\/strong> \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u0432\u044b \u043d\u0430\u0436\u043c\u0435\u0442\u0435 \u043d\u0430 <strong>Expand Android Framework<\/strong>, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u043f\u0440\u043e\u0448\u043b\u0438\u0441\u044c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/688\/e4c\/869\/688e4c8698d9410f9dd0ede550b911e6.png\" alt=\"image\"\/>  <\/p>\n<h3>Q&#038;A<\/h3>\n<p>  <strong>Q: \u0415\u0441\u0442\u044c \u043b\u0438 \u043a\u0430\u043a\u0430\u044f \u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 Dalvik \u0438 ART runtime \u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0432\u044b\u0437\u043e\u0432\u0430 getResourceAsStream()<\/strong><\/p>\n<p>  A: \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435\u0442, \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0442\u043e\u043a AOSP <strong>android-6.0.1_r11<\/strong> \u0441 ART \u0438 <strong>android-4.4.4_r2<\/strong> \u0441 Dalvik. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0435\u0441\u0442\u044c \u0432 \u043e\u0431\u0435\u0438\u0445!<br \/>  \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \ud83d\ude42<\/p>\n<p>  <strong>Q: \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 ClassLoader.findClass()<\/strong><\/p>\n<p>  A: \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043d\u0430\u043c \u043a\u043b\u0430\u0441\u0441 <strong>DexPathList<\/strong>, \u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c:  <\/p>\n<pre><code class=\"java\">public Class findClass(String name, List&lt;Throwable&gt; suppressed) {   for (Element element : dexElements) {       DexFile dex = element.dexFile;        if (dex != null) {           Class clazz = dex.loadClassBinaryName(name, definingContext, suppressed);           if (clazz != null) {               return clazz;           }       }   }   if (dexElementsSuppressedExceptions != null) {       suppressed.addAll(Arrays.asList(dexElementsSuppressedExceptions));   }   return null; }<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0432 \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u044b \u043f\u0440\u0438\u0439\u0434\u0435\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443:  <\/p>\n<pre><code class=\"java\">private static native Class defineClassNative(String name, ClassLoader loader, Object cookie)             throws ClassNotFoundException, NoClassDefFoundError;<\/code><\/pre>\n<p>  \u0418 \u0434\u0430\u043b\u044c\u0448\u0435 \u0442\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 runtime (ART \u0438\u043b\u0438 Dalvik), \u043d\u043e \u043a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <strong>ZipFile<\/strong>.<\/p>\n<p>  <strong>Q: \u041f\u043e\u0447\u0435\u043c\u0443 \u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 Resources.get\u2026 (resId) \u043d\u0435\u0442 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/strong><\/p>\n<p>  A: \u041f\u043e \u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u0447\u0442\u043e \u0438 \u0443 ClassLoader.findClass().<br \/>  \u0412\u0441\u0435 \u044d\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u0438\u0432\u0435\u0434\u0443\u0442 \u043d\u0430\u0441 \u043a <a href=\"https:\/\/android.googlesource.com\/platform\/frameworks\/base\/+\/android-6.0.1_r11\/core\/java\/android\/content\/res\/AssetManager.java\">\/frameworks\/base\/core\/java\/android\/content\/res\/AssetManager.java<\/a>  <\/p>\n<pre><code class=\"java\">\/** Returns true if the resource was found, filling in mRetStringBlock and  *  mRetData. *\/ private native final int loadResourceValue(int ident, short density, TypedValue outValue,         boolean resolve);<\/code><\/pre>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435! <strong>Happy coding!<\/strong>                 <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/280340\/\"> https:\/\/habrahabr.ru\/post\/280340\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f17\/6ea\/a03\/f176eaa03305493d871870040b054a84.png\" alt=\"image\"\/><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 ClassLoader.getResourceAsStream() \u0432 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c 1432ms \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0430\u0441\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-277200","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=277200"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277200\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}