summaryrefslogtreecommitdiffstats
path: root/luni/src/test/java/libcore/io
Commit message (Collapse)AuthorAgeFilesLines
* Add getxattr/setxattr/removexattr syscalls.Jeff Sharkey2015-07-021-0/+56
| | | | | Bug: 20275572 Change-Id: I958056f757f095ad6278624e293a5583d9cee822
* Remove a superfluous cast.Lorenzo Colitti2015-03-171-2/+2
| | | | Change-Id: I1b4b9d9160a66d0ce9aa2449526041d1c75d545d
* Also support IPv4 fallback in the SocketAddress version of sendto.Lorenzo Colitti2015-03-141-5/+13
| | | | Change-Id: I90bbc9661b0a48bb19c9c1c5aa4cd493f4dff2fa
* Support packet sockets in libcore.Lorenzo Colitti2015-03-141-0/+22
| | | | | Bug: 19704592 Change-Id: Ic424e4c36f6de028df4a3095f57a08b68da78033
* Add a version of sendto that takes a SocketAddress.Lorenzo Colitti2015-03-141-0/+19
| | | | | | | | Only the byte[] version for now. The ByteBuffer version will be added later. Bug: 19704592 Change-Id: I35c5f305b5828ff3315e42aae72aa4b01839e2fc
* Make it possible to use AF_INET sockets created by libcore.Lorenzo Colitti2015-03-141-4/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, it's possible to create AF_INET sockets using: Libcore.os.socket(AF_INET, ... but such sockets can't be used for anything, because os.bind() and os.connect() automatically convert IPv4 addresses to IPv4-mapped addresses (e.g., 192.0.2.1 to ::ffff:192.0.2.1), and passing a sockaddr_in6 to a system call on an AF_INET socket causes the kernel to return EAFNOSUPPORT. When this happens, retry using an unmapped IPv4 address. We could also call getsockopt(SOL_SOCKET, SO_DOMAIN) before every system call and pass in the appropriate socket address structure, but that would cause these socket functions to make two system calls instead of one and would probably halve the performance of sendto(). This way, there's only one system call for most sockets (including all AF_INET6 sockets created in Java), and two system calls only in the rare case of a socket that's explicitly created as AF_INET. Bug: 18558481 Bug: 19704592 Change-Id: I71b3728b6a72b742e156d4c60db65e88b9a9e51e
* Add support for netlink sockets and addresses.Erik Kline2015-03-091-0/+16
| | | | | | | | | | | | Additionally: - support bind and connect calls with SocketAddresses - getsockname and getpeername can return a NetlinkSocketAddress Developed in conjunction with: https://android-review.googlesource.com/135490 Bug: 18581716 Change-Id: I760a06cdb9bdb26c734fb02cf668a94de982e2b6
* Add fcntlInt.Narayan Kamath2015-01-161-0/+14
| | | | | | Hidden for now, for use from the frameworks. Change-Id: I30d95b28ecbc422aaa5bf28fb2f288c3ca026493
* Update ByteBuffer positions in Posix.* functions.Narayan Kamath2014-12-151-1/+120
| | | | | | | | | | | Also add tests in libcore.io.OsTest and update (and simplify) callers that were updating the position themselves. bug: 18641009 (cherry picked from commit f3b61eaf1931ae8393e54202a717334a4971ebdf) Change-Id: I8a810b2dfde7c13278807381bdfe7f532a3481a0
* Groundwork towards making the Libcore.os functionality public.Elliott Hughes2014-04-241-2/+2
| | | | Change-Id: Ie700aa16d91fba53fc5eb2555829cb74d84b12ad
* MemoryTest LP64 fixes.Elliott Hughes2014-02-031-9/+9
| | | | | | | Change-Id: I767b1366d2315522b51f60667eb5c04b3e8dff39 Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
* If libcore wants ASCII casing, it needs to ask for it like everyone else.Elliott Hughes2013-08-021-2/+3
| | | | | | | http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html Bug: https://code.google.com/p/android/issues/detail?id=58359 Change-Id: I597b2ac940f17b5b2bc176e390dc4b63fe0a4e72
* Add java.nio.charsets.StandardCharsets.Elliott Hughes2013-06-281-3/+2
| | | | | Bug: 3484927 Change-Id: I5820267491b850b8fcc696fa48962710de123009
* Revert "Revert "Clean up some code that's dead now we're using OkHttp.""Elliott Hughes2013-04-081-868/+0
| | | | | | This reverts commit 7653089cb7609f6269aecd68e839c40941cb1a46 Change-Id: Ie3c0fd1f5d51d61e55ec3a581464943e63716b38
* Revert "Clean up some code that's dead now we're using OkHttp."Elliott Hughes2013-04-081-0/+868
| | | | | | This reverts commit a77a6f93de75a1d9c51ea142013c5fd54c85a359 Change-Id: If6cfe5031efd2d36eae4af5774757667efcb67a2
* Clean up some code that's dead now we're using OkHttp.Elliott Hughes2013-04-081-868/+0
| | | | Change-Id: I4b85c2419e73dc15f921157ce3221225a06b30bf
* Add strsignal(3) to Libcore.os.Elliott Hughes2013-03-281-0/+5
| | | | | Bug: 8322568 Change-Id: Iab9a782181a663719b88f090f474b66d24b69258
* Add support for Unix domain sockets.Elliott Hughes2013-03-201-9/+104
| | | | | Bug: 6513075 Change-Id: I0b0166f59745ac8175b39d7796c093041b2df4fd
* Track redundant ops when opening the cache.jwilson2013-01-031-0/+38
| | | | | | See https://github.com/JakeWharton/DiskLruCache/issues/28 Change-Id: I4815aed3b40f0d2599ff12a42853a4947feffbca
* Performance improvements: DiskLruCache, HttpResponseCache.Vladimir Marko2012-08-161-0/+84
| | | | | | | | | | | | Add StrictLineReader for efficient reading of lines consistent with Streams.readAsciiLine(). Use this to improve DiskLruCache.readJournal() and initialization of HttpResponseCache$Entry from InputStream. (cherry-pick of e03b551079aae1204e505f1dc24f2b986ef82ec0.) Bug: 6739304 Change-Id: If3083031f1368a9bbbd405c91553d7a205fd4e39
* Tolerate cache files being removed from underneath DiskLruCacheBrian Carlstrom2012-07-241-1/+23
| | | | | Bug: 6777079 Change-Id: I2f950ab6d847dd63061aeb449fc5d46ab9e6c50a
* am 47d9600b: am 31e127f9: Merge "[MIPS] Add MIPS Architecture support"Elliott Hughes2012-05-021-34/+86
|\ | | | | | | | | * commit '47d9600b5c908b171811ca2893cdef3261589def': [MIPS] Add MIPS Architecture support
| * [MIPS] Add MIPS Architecture supportChris Dearman2012-05-021-34/+86
| | | | | | | | | | Change-Id: Idce58bad54a3f25dbe984c580cb6a48cc906ba76 Signed-off-by: Chris Dearman <chris@mips.com>
* | Give DiskLruCache an API to edit a snapshot.Jesse Wilson2011-12-211-0/+53
|/ | | | | | | | | | | When an HTTP conditional GET results in a cache hit (ie. 304 Not Modified) we want to update the cache's HTTP headers with the server's latest. Unfortunately prior to this change DiskLruCache had no mechanism to atomically change a snapshot. This change gives us a mechanism to upgrade from a snapshot (read only) to an editor (read/write). Bug: http://b/4460598 Change-Id: I1714fe9ce4291d0c5095460173bc4cf6da6ce9ea
* Use Libcore.os.fstat to recognize socket FileDescriptors in BlockGuard.Elliott Hughes2011-08-111-0/+37
| | | | | | | | | | Exception throwing is pretty slow, and BlockGuard's isLingerSocket causes us to throw whenever we close a non-socket fd. Avoid that by adding a cheap test for socket fds and only calling isLingerSocket on socket fds. Bug: 4972558 Change-Id: Ib18d6c0c091cb366f953d7467e83fad570bb3457
* Test DiskLruCache with fault injection.Jesse Wilson2011-05-161-10/+43
| | | | | | | | | This tests what happens when the filesystem fails while reading or writing the cached files. I still need to test what happens when there are failures reading or writing the journal. Change-Id: I48018514ef5b8cc206efc905b1823eb49589c8e8 http://b/3180373
* Move APIs from internal HttpResponseCache to external one.Jesse Wilson2011-05-141-1/+13
| | | | | Change-Id: Ia6c88f292088bfd3ed546c067376fcb36b435b48 http://b/3180373
* Rebuild the DiskLruCache journal periodically.Jesse Wilson2011-05-121-0/+37
| | | | | Change-Id: I8a9303387b550a307cfb49c037879164fe6898e8 http://b/3180373
* Add the application version to the DiskLruCache journal.Jesse Wilson2011-05-121-26/+37
| | | | | | | | This makes it easy for us to change how we store HTTP cache data without fear of compatibility problems. Change-Id: I26cd6645d26f359ab76e2f87b6ab73bbf24ab715 http://b/3180373
* Provide hit and miss stats on the HTTP response cache.Jesse Wilson2011-05-121-1/+16
| | | | | | | | | | | | Also capture FDs rather than InputStreams when a cache entry is read. This permits the cache to return as many streams as the caller requires. Also fix bugs where we weren't properly releasing the input streams from the responses. Change-Id: I04807eab648864229f1e8734ad1fbb6a2d6bb51d http://b/3180373
* Support Eviction in DiskLruCache.Jesse Wilson2011-05-111-26/+202
| | | | | Change-Id: I84f536e597efb4c2b8dd519261b327dcd3e9eefa http://b/3180373
* Dont line wrap Base64.Jesse Wilson2011-05-101-0/+55
| | | | Change-Id: I9a16a09dad9ff170921591455b17a3b738e70655
* DiskLruCache, backing store for the HttpResponseCache.Jesse Wilson2011-05-101-0/+471
| | | | | | | | | | | | | This is a work in progress. This cache doesn't yet have support for eviction or journal compaction. This isn't intended to ever be public API but it should still have some user documentation. Change-Id: I62800661a8170ee117622b799836f17226abb7e4 http://b/3180373 Conflicts: luni/src/main/java/libcore/io/IoUtils.java
* Make OSMemory the semi-supported libcore.io.Memory.Elliott Hughes2011-03-141-0/+92
Looks like we're not going to bother with a separate libcore.os package, when libcore.io will do. Change-Id: I2806c59349ed4b6410d768c4207c384ced973c54