123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214 |
- .class final Lokio/RealBufferedSource;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Lokio/BufferedSource;
- # instance fields
- .field public final buffer:Lokio/Buffer;
- .field closed:Z
- .field public final source:Lokio/Source;
- # direct methods
- .method constructor <init>(Lokio/Source;)V
- .locals 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance v0, Lokio/Buffer;
- invoke-direct {v0}, Lokio/Buffer;-><init>()V
- iput-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- if-eqz p1, :cond_0
- iput-object p1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- return-void
- :cond_0
- new-instance p1, Ljava/lang/NullPointerException;
- const-string v0, "source == null"
- invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- # virtual methods
- .method public buffer()Lokio/Buffer;
- .locals 1
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- return-object v0
- .end method
- .method public close()V
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-eqz v0, :cond_0
- return-void
- :cond_0
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- invoke-interface {v0}, Lokio/Source;->close()V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->clear()V
- return-void
- .end method
- .method public exhausted()Z
- .locals 5
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_1
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->exhausted()Z
- move-result v0
- if-eqz v0, :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- const-wide/16 v2, 0x2000
- invoke-interface {v0, v1, v2, v3}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long v4, v0, v2
- if-nez v4, :cond_0
- const/4 v0, 0x1
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return v0
- :cond_1
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "closed"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method public indexOf(B)J
- .locals 6
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v2, 0x0
- const-wide v4, 0x7fffffffffffffffL
- move-object v0, p0
- move v1, p1
- invoke-virtual/range {v0 .. v5}, Lokio/RealBufferedSource;->indexOf(BJJ)J
- move-result-wide v0
- return-wide v0
- .end method
- .method public indexOf(BJ)J
- .locals 6
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide v4, 0x7fffffffffffffffL
- move-object v0, p0
- move v1, p1
- move-wide v2, p2
- invoke-virtual/range {v0 .. v5}, Lokio/RealBufferedSource;->indexOf(BJJ)J
- move-result-wide p1
- return-wide p1
- .end method
- .method public indexOf(BJJ)J
- .locals 9
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_4
- const-wide/16 v0, 0x0
- cmp-long v2, p2, v0
- if-ltz v2, :cond_3
- cmp-long v0, p4, p2
- if-ltz v0, :cond_3
- :goto_0
- const-wide/16 v7, -0x1
- cmp-long v0, p2, p4
- if-gez v0, :cond_2
- iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- move v2, p1
- move-wide v3, p2
- move-wide v5, p4
- invoke-virtual/range {v1 .. v6}, Lokio/Buffer;->indexOf(BJJ)J
- move-result-wide v0
- cmp-long v2, v0, v7
- if-eqz v2, :cond_0
- return-wide v0
- :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v1, v0, Lokio/Buffer;->size:J
- cmp-long v3, v1, p4
- if-gez v3, :cond_2
- iget-object v3, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v4, 0x2000
- invoke-interface {v3, v0, v4, v5}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v3
- cmp-long v0, v3, v7
- if-nez v0, :cond_1
- goto :goto_1
- :cond_1
- invoke-static {p2, p3, v1, v2}, Ljava/lang/Math;->max(JJ)J
- move-result-wide p2
- goto :goto_0
- :cond_2
- :goto_1
- return-wide v7
- :cond_3
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const/4 v0, 0x2
- new-array v0, v0, [Ljava/lang/Object;
- const/4 v1, 0x0
- invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
- move-result-object p2
- aput-object p2, v0, v1
- const/4 p2, 0x1
- invoke-static {p4, p5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
- move-result-object p3
- aput-object p3, v0, p2
- const-string p2, "fromIndex=%s toIndex=%s"
- invoke-static {p2, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
- move-result-object p2
- invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_4
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string p2, "closed"
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_3
- :goto_2
- throw p1
- :goto_3
- goto :goto_2
- .end method
- .method public indexOf(Lokio/ByteString;)J
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x0
- invoke-virtual {p0, p1, v0, v1}, Lokio/RealBufferedSource;->indexOf(Lokio/ByteString;J)J
- move-result-wide v0
- return-wide v0
- .end method
- .method public indexOf(Lokio/ByteString;J)J
- .locals 8
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_2
- :goto_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->indexOf(Lokio/ByteString;J)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long v4, v0, v2
- if-eqz v4, :cond_0
- return-wide v0
- :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v4, v0, Lokio/Buffer;->size:J
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v6, 0x2000
- invoke-interface {v1, v0, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v0
- cmp-long v6, v0, v2
- if-nez v6, :cond_1
- return-wide v2
- :cond_1
- invoke-virtual {p1}, Lokio/ByteString;->size()I
- move-result v0
- int-to-long v0, v0
- sub-long/2addr v4, v0
- const-wide/16 v0, 0x1
- add-long/2addr v4, v0
- invoke-static {p2, p3, v4, v5}, Ljava/lang/Math;->max(JJ)J
- move-result-wide p2
- goto :goto_0
- :cond_2
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string p2, "closed"
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
- .method public indexOfElement(Lokio/ByteString;)J
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x0
- invoke-virtual {p0, p1, v0, v1}, Lokio/RealBufferedSource;->indexOfElement(Lokio/ByteString;J)J
- move-result-wide v0
- return-wide v0
- .end method
- .method public indexOfElement(Lokio/ByteString;J)J
- .locals 8
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_2
- :goto_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->indexOfElement(Lokio/ByteString;J)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long v4, v0, v2
- if-eqz v4, :cond_0
- return-wide v0
- :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v4, v0, Lokio/Buffer;->size:J
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v6, 0x2000
- invoke-interface {v1, v0, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v0
- cmp-long v6, v0, v2
- if-nez v6, :cond_1
- return-wide v2
- :cond_1
- invoke-static {p2, p3, v4, v5}, Ljava/lang/Math;->max(JJ)J
- move-result-wide p2
- goto :goto_0
- :cond_2
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string p2, "closed"
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
- .method public inputStream()Ljava/io/InputStream;
- .locals 1
- new-instance v0, Lokio/RealBufferedSource$1;
- invoke-direct {v0, p0}, Lokio/RealBufferedSource$1;-><init>(Lokio/RealBufferedSource;)V
- return-object v0
- .end method
- .method public rangeEquals(JLokio/ByteString;)Z
- .locals 6
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p3}, Lokio/ByteString;->size()I
- move-result v5
- const/4 v4, 0x0
- move-object v0, p0
- move-wide v1, p1
- move-object v3, p3
- invoke-virtual/range {v0 .. v5}, Lokio/RealBufferedSource;->rangeEquals(JLokio/ByteString;II)Z
- move-result p1
- return p1
- .end method
- .method public rangeEquals(JLokio/ByteString;II)Z
- .locals 7
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_5
- const-wide/16 v0, 0x0
- const/4 v2, 0x0
- cmp-long v3, p1, v0
- if-ltz v3, :cond_4
- if-ltz p4, :cond_4
- if-ltz p5, :cond_4
- invoke-virtual {p3}, Lokio/ByteString;->size()I
- move-result v0
- sub-int/2addr v0, p4
- if-ge v0, p5, :cond_0
- goto :goto_1
- :cond_0
- const/4 v0, 0x0
- :goto_0
- if-ge v0, p5, :cond_3
- int-to-long v3, v0
- add-long/2addr v3, p1
- const-wide/16 v5, 0x1
- add-long/2addr v5, v3
- invoke-virtual {p0, v5, v6}, Lokio/RealBufferedSource;->request(J)Z
- move-result v1
- if-nez v1, :cond_1
- return v2
- :cond_1
- iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v1, v3, v4}, Lokio/Buffer;->getByte(J)B
- move-result v1
- add-int v3, p4, v0
- invoke-virtual {p3, v3}, Lokio/ByteString;->getByte(I)B
- move-result v3
- if-eq v1, v3, :cond_2
- return v2
- :cond_2
- add-int/lit8 v0, v0, 0x1
- goto :goto_0
- :cond_3
- const/4 p1, 0x1
- return p1
- :cond_4
- :goto_1
- return v2
- :cond_5
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string p2, "closed"
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_3
- :goto_2
- throw p1
- :goto_3
- goto :goto_2
- .end method
- .method public read([B)I
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- array-length v0, p1
- const/4 v1, 0x0
- invoke-virtual {p0, p1, v1, v0}, Lokio/RealBufferedSource;->read([BII)I
- move-result p1
- return p1
- .end method
- .method public read([BII)I
- .locals 9
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- array-length v0, p1
- int-to-long v1, v0
- int-to-long v3, p2
- int-to-long v7, p3
- move-wide v5, v7
- invoke-static/range {v1 .. v6}, Lokio/Util;->checkOffsetAndCount(JJJ)V
- iget-object p3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v0, p3, Lokio/Buffer;->size:J
- const-wide/16 v2, 0x0
- cmp-long v4, v0, v2
- if-nez v4, :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v1, 0x2000
- invoke-interface {v0, p3, v1, v2}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long p3, v0, v2
- if-nez p3, :cond_0
- const/4 p1, -0x1
- return p1
- :cond_0
- iget-object p3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v0, p3, Lokio/Buffer;->size:J
- invoke-static {v7, v8, v0, v1}, Ljava/lang/Math;->min(JJ)J
- move-result-wide v0
- long-to-int p3, v0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->read([BII)I
- move-result p1
- return p1
- .end method
- .method public read(Lokio/Buffer;J)J
- .locals 6
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- if-eqz p1, :cond_3
- const-wide/16 v0, 0x0
- cmp-long v2, p2, v0
- if-ltz v2, :cond_2
- iget-boolean v2, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v2, :cond_1
- iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v3, v2, Lokio/Buffer;->size:J
- cmp-long v5, v3, v0
- if-nez v5, :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v3, 0x2000
- invoke-interface {v0, v2, v3, v4}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long v4, v0, v2
- if-nez v4, :cond_0
- return-wide v2
- :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v0, v0, Lokio/Buffer;->size:J
- invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->min(JJ)J
- move-result-wide p2
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->read(Lokio/Buffer;J)J
- move-result-wide p1
- return-wide p1
- :cond_1
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string p2, "closed"
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_2
- new-instance p1, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "byteCount < 0: "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p2
- invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_3
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string p2, "sink == null"
- invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public readAll(Lokio/Sink;)J
- .locals 9
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- if-eqz p1, :cond_3
- const-wide/16 v0, 0x0
- move-wide v2, v0
- :cond_0
- :goto_0
- iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- iget-object v5, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- const-wide/16 v6, 0x2000
- invoke-interface {v4, v5, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v4
- const-wide/16 v6, -0x1
- cmp-long v8, v4, v6
- iget-object v4, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- if-eqz v8, :cond_1
- invoke-virtual {v4}, Lokio/Buffer;->completeSegmentByteCount()J
- move-result-wide v4
- cmp-long v6, v4, v0
- if-lez v6, :cond_0
- add-long/2addr v2, v4
- iget-object v6, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-interface {p1, v6, v4, v5}, Lokio/Sink;->write(Lokio/Buffer;J)V
- goto :goto_0
- :cond_1
- invoke-virtual {v4}, Lokio/Buffer;->size()J
- move-result-wide v4
- cmp-long v6, v4, v0
- if-lez v6, :cond_2
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->size()J
- move-result-wide v0
- add-long/2addr v2, v0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->size()J
- move-result-wide v4
- invoke-interface {p1, v0, v4, v5}, Lokio/Sink;->write(Lokio/Buffer;J)V
- :cond_2
- return-wide v2
- :cond_3
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "sink == null"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
- .method public readByte()B
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x1
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readByte()B
- move-result v0
- return v0
- .end method
- .method public readByteArray()[B
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readByteArray()[B
- move-result-object v0
- return-object v0
- .end method
- .method public readByteArray(J)[B
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readByteArray(J)[B
- move-result-object p1
- return-object p1
- .end method
- .method public readByteString()Lokio/ByteString;
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString;
- move-result-object v0
- return-object v0
- .end method
- .method public readByteString(J)Lokio/ByteString;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readByteString(J)Lokio/ByteString;
- move-result-object p1
- return-object p1
- .end method
- .method public readDecimalLong()J
- .locals 6
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x1
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- const/4 v0, 0x0
- const/4 v1, 0x0
- :goto_0
- add-int/lit8 v2, v1, 0x1
- int-to-long v3, v2
- invoke-virtual {p0, v3, v4}, Lokio/RealBufferedSource;->request(J)Z
- move-result v3
- if-eqz v3, :cond_4
- iget-object v3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- int-to-long v4, v1
- invoke-virtual {v3, v4, v5}, Lokio/Buffer;->getByte(J)B
- move-result v3
- const/16 v4, 0x30
- if-lt v3, v4, :cond_0
- const/16 v4, 0x39
- if-le v3, v4, :cond_1
- :cond_0
- if-nez v1, :cond_2
- const/16 v4, 0x2d
- if-eq v3, v4, :cond_1
- goto :goto_1
- :cond_1
- move v1, v2
- goto :goto_0
- :cond_2
- :goto_1
- if-eqz v1, :cond_3
- goto :goto_2
- :cond_3
- new-instance v1, Ljava/lang/NumberFormatException;
- const/4 v2, 0x1
- new-array v2, v2, [Ljava/lang/Object;
- invoke-static {v3}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
- move-result-object v3
- aput-object v3, v2, v0
- const-string v0, "Expected leading [0-9] or \'-\' character but was %#x"
- invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
- move-result-object v0
- invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
- throw v1
- :cond_4
- :goto_2
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readDecimalLong()J
- move-result-wide v0
- return-wide v0
- .end method
- .method public readFully(Lokio/Buffer;J)V
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- :try_start_0
- invoke-virtual {p0, p2, p3}, Lokio/RealBufferedSource;->require(J)V
- :try_end_0
- .catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->readFully(Lokio/Buffer;J)V
- return-void
- :catch_0
- move-exception p2
- iget-object p3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {p1, p3}, Lokio/Buffer;->writeAll(Lokio/Source;)J
- throw p2
- .end method
- .method public readFully([B)V
- .locals 8
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- :try_start_0
- array-length v0, p1
- int-to-long v0, v0
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- :try_end_0
- .catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1}, Lokio/Buffer;->readFully([B)V
- return-void
- :catch_0
- move-exception v0
- const/4 v1, 0x0
- :goto_0
- iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v3, v2, Lokio/Buffer;->size:J
- const-wide/16 v5, 0x0
- cmp-long v7, v3, v5
- if-lez v7, :cond_1
- long-to-int v4, v3
- invoke-virtual {v2, p1, v1, v4}, Lokio/Buffer;->read([BII)I
- move-result v2
- const/4 v3, -0x1
- if-eq v2, v3, :cond_0
- add-int/2addr v1, v2
- goto :goto_0
- :cond_0
- new-instance p1, Ljava/lang/AssertionError;
- invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
- throw p1
- :cond_1
- goto :goto_2
- :goto_1
- throw v0
- :goto_2
- goto :goto_1
- .end method
- .method public readHexadecimalUnsignedLong()J
- .locals 6
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x1
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- const/4 v0, 0x0
- const/4 v1, 0x0
- :goto_0
- add-int/lit8 v2, v1, 0x1
- int-to-long v3, v2
- invoke-virtual {p0, v3, v4}, Lokio/RealBufferedSource;->request(J)Z
- move-result v3
- if-eqz v3, :cond_5
- iget-object v3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- int-to-long v4, v1
- invoke-virtual {v3, v4, v5}, Lokio/Buffer;->getByte(J)B
- move-result v3
- const/16 v4, 0x30
- if-lt v3, v4, :cond_0
- const/16 v4, 0x39
- if-le v3, v4, :cond_2
- :cond_0
- const/16 v4, 0x61
- if-lt v3, v4, :cond_1
- const/16 v4, 0x66
- if-le v3, v4, :cond_2
- :cond_1
- const/16 v4, 0x41
- if-lt v3, v4, :cond_3
- const/16 v4, 0x46
- if-le v3, v4, :cond_2
- goto :goto_1
- :cond_2
- move v1, v2
- goto :goto_0
- :cond_3
- :goto_1
- if-eqz v1, :cond_4
- goto :goto_2
- :cond_4
- new-instance v1, Ljava/lang/NumberFormatException;
- const/4 v2, 0x1
- new-array v2, v2, [Ljava/lang/Object;
- invoke-static {v3}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
- move-result-object v3
- aput-object v3, v2, v0
- const-string v0, "Expected leading [0-9a-fA-F] character but was %#x"
- invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
- move-result-object v0
- invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
- throw v1
- :cond_5
- :goto_2
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readHexadecimalUnsignedLong()J
- move-result-wide v0
- return-wide v0
- .end method
- .method public readInt()I
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x4
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readInt()I
- move-result v0
- return v0
- .end method
- .method public readIntLe()I
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x4
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readIntLe()I
- move-result v0
- return v0
- .end method
- .method public readLong()J
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x8
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readLong()J
- move-result-wide v0
- return-wide v0
- .end method
- .method public readLongLe()J
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x8
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readLongLe()J
- move-result-wide v0
- return-wide v0
- .end method
- .method public readShort()S
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x2
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readShort()S
- move-result v0
- return v0
- .end method
- .method public readShortLe()S
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x2
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readShortLe()S
- move-result v0
- return v0
- .end method
- .method public readString(JLjava/nio/charset/Charset;)Ljava/lang/String;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
- if-eqz p3, :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->readString(JLjava/nio/charset/Charset;)Ljava/lang/String;
- move-result-object p1
- return-object p1
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string p2, "charset == null"
- invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public readString(Ljava/nio/charset/Charset;)Ljava/lang/String;
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- if-eqz p1, :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1}, Lokio/Buffer;->readString(Ljava/nio/charset/Charset;)Ljava/lang/String;
- move-result-object p1
- return-object p1
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "charset == null"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public readUtf8()Ljava/lang/String;
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readUtf8()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public readUtf8(J)Ljava/lang/String;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readUtf8(J)Ljava/lang/String;
- move-result-object p1
- return-object p1
- .end method
- .method public readUtf8CodePoint()I
- .locals 3
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x1
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- const-wide/16 v1, 0x0
- invoke-virtual {v0, v1, v2}, Lokio/Buffer;->getByte(J)B
- move-result v0
- and-int/lit16 v1, v0, 0xe0
- const/16 v2, 0xc0
- if-ne v1, v2, :cond_0
- const-wide/16 v0, 0x2
- :goto_0
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
- goto :goto_1
- :cond_0
- and-int/lit16 v1, v0, 0xf0
- const/16 v2, 0xe0
- if-ne v1, v2, :cond_1
- const-wide/16 v0, 0x3
- goto :goto_0
- :cond_1
- and-int/lit16 v0, v0, 0xf8
- const/16 v1, 0xf0
- if-ne v0, v1, :cond_2
- const-wide/16 v0, 0x4
- goto :goto_0
- :cond_2
- :goto_1
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->readUtf8CodePoint()I
- move-result v0
- return v0
- .end method
- .method public readUtf8Line()Ljava/lang/String;
- .locals 5
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const/16 v0, 0xa
- invoke-virtual {p0, v0}, Lokio/RealBufferedSource;->indexOf(B)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long v4, v0, v2
- if-nez v4, :cond_1
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v0, v0, Lokio/Buffer;->size:J
- const-wide/16 v2, 0x0
- cmp-long v4, v0, v2
- if-eqz v4, :cond_0
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->readUtf8(J)Ljava/lang/String;
- move-result-object v0
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return-object v0
- :cond_1
- iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v2, v0, v1}, Lokio/Buffer;->readUtf8Line(J)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public readUtf8LineStrict()Ljava/lang/String;
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide v0, 0x7fffffffffffffffL
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->readUtf8LineStrict(J)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public readUtf8LineStrict(J)Ljava/lang/String;
- .locals 12
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x0
- cmp-long v2, p1, v0
- if-ltz v2, :cond_3
- const-wide/16 v0, 0x1
- const-wide v2, 0x7fffffffffffffffL
- cmp-long v4, p1, v2
- if-nez v4, :cond_0
- move-wide v4, v2
- goto :goto_0
- :cond_0
- add-long v4, p1, v0
- :goto_0
- const/16 v7, 0xa
- const-wide/16 v8, 0x0
- move-object v6, p0
- move-wide v10, v4
- invoke-virtual/range {v6 .. v11}, Lokio/RealBufferedSource;->indexOf(BJJ)J
- move-result-wide v6
- const-wide/16 v8, -0x1
- cmp-long v10, v6, v8
- if-eqz v10, :cond_1
- iget-object p1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {p1, v6, v7}, Lokio/Buffer;->readUtf8Line(J)Ljava/lang/String;
- move-result-object p1
- return-object p1
- :cond_1
- cmp-long v6, v4, v2
- if-gez v6, :cond_2
- invoke-virtual {p0, v4, v5}, Lokio/RealBufferedSource;->request(J)Z
- move-result v2
- if-eqz v2, :cond_2
- iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- sub-long v6, v4, v0
- invoke-virtual {v2, v6, v7}, Lokio/Buffer;->getByte(J)B
- move-result v2
- const/16 v3, 0xd
- if-ne v2, v3, :cond_2
- add-long/2addr v0, v4
- invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->request(J)Z
- move-result v0
- if-eqz v0, :cond_2
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, v4, v5}, Lokio/Buffer;->getByte(J)B
- move-result v0
- const/16 v1, 0xa
- if-ne v0, v1, :cond_2
- iget-object p1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {p1, v4, v5}, Lokio/Buffer;->readUtf8Line(J)Ljava/lang/String;
- move-result-object p1
- return-object p1
- :cond_2
- new-instance v6, Lokio/Buffer;
- invoke-direct {v6}, Lokio/Buffer;-><init>()V
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- const-wide/16 v2, 0x0
- const-wide/16 v4, 0x20
- invoke-virtual {v0}, Lokio/Buffer;->size()J
- move-result-wide v7
- invoke-static {v4, v5, v7, v8}, Ljava/lang/Math;->min(JJ)J
- move-result-wide v4
- move-object v1, v6
- invoke-virtual/range {v0 .. v5}, Lokio/Buffer;->copyTo(Lokio/Buffer;JJ)Lokio/Buffer;
- new-instance v0, Ljava/io/EOFException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "\\n not found: limit="
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v2}, Lokio/Buffer;->size()J
- move-result-wide v2
- invoke-static {v2, v3, p1, p2}, Ljava/lang/Math;->min(JJ)J
- move-result-wide p1
- invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
- const-string p1, " content="
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v6}, Lokio/Buffer;->readByteString()Lokio/ByteString;
- move-result-object p1
- invoke-virtual {p1}, Lokio/ByteString;->hex()Ljava/lang/String;
- move-result-object p1
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const/16 p1, 0x2026
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/io/EOFException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_3
- new-instance v0, Ljava/lang/IllegalArgumentException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "limit < 0: "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method public request(J)Z
- .locals 5
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const-wide/16 v0, 0x0
- cmp-long v2, p1, v0
- if-ltz v2, :cond_3
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_2
- :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v1, v0, Lokio/Buffer;->size:J
- cmp-long v3, v1, p1
- if-gez v3, :cond_1
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v2, 0x2000
- invoke-interface {v1, v0, v2, v3}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long v4, v0, v2
- if-nez v4, :cond_0
- const/4 p1, 0x0
- return p1
- :cond_1
- const/4 p1, 0x1
- return p1
- :cond_2
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string p2, "closed"
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_3
- new-instance v0, Ljava/lang/IllegalArgumentException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "byteCount < 0: "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- goto :goto_1
- :goto_0
- throw v0
- :goto_1
- goto :goto_0
- .end method
- .method public require(J)V
- .locals 0
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->request(J)Z
- move-result p1
- if-eqz p1, :cond_0
- return-void
- :cond_0
- new-instance p1, Ljava/io/EOFException;
- invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
- throw p1
- .end method
- .method public select(Lokio/Options;)I
- .locals 8
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_3
- :cond_0
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0, p1}, Lokio/Buffer;->selectPrefix(Lokio/Options;)I
- move-result v0
- const/4 v1, -0x1
- if-ne v0, v1, :cond_1
- return v1
- :cond_1
- iget-object v2, p1, Lokio/Options;->byteStrings:[Lokio/ByteString;
- aget-object v2, v2, v0
- invoke-virtual {v2}, Lokio/ByteString;->size()I
- move-result v2
- int-to-long v2, v2
- iget-object v4, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v5, v4, Lokio/Buffer;->size:J
- cmp-long v7, v2, v5
- if-gtz v7, :cond_2
- invoke-virtual {v4, v2, v3}, Lokio/Buffer;->skip(J)V
- return v0
- :cond_2
- iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v2, 0x2000
- invoke-interface {v0, v4, v2, v3}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v2
- const-wide/16 v4, -0x1
- cmp-long v0, v2, v4
- if-nez v0, :cond_0
- return v1
- :cond_3
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string v0, "closed"
- invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_1
- :goto_0
- throw p1
- :goto_1
- goto :goto_0
- .end method
- .method public skip(J)V
- .locals 6
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
- if-nez v0, :cond_3
- :goto_0
- const-wide/16 v0, 0x0
- cmp-long v2, p1, v0
- if-lez v2, :cond_2
- iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- iget-wide v3, v2, Lokio/Buffer;->size:J
- cmp-long v5, v3, v0
- if-nez v5, :cond_1
- iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- const-wide/16 v3, 0x2000
- invoke-interface {v0, v2, v3, v4}, Lokio/Source;->read(Lokio/Buffer;J)J
- move-result-wide v0
- const-wide/16 v2, -0x1
- cmp-long v4, v0, v2
- if-eqz v4, :cond_0
- goto :goto_1
- :cond_0
- new-instance p1, Ljava/io/EOFException;
- invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
- throw p1
- :cond_1
- :goto_1
- iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v0}, Lokio/Buffer;->size()J
- move-result-wide v0
- invoke-static {p1, p2, v0, v1}, Ljava/lang/Math;->min(JJ)J
- move-result-wide v0
- iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
- invoke-virtual {v2, v0, v1}, Lokio/Buffer;->skip(J)V
- sub-long/2addr p1, v0
- goto :goto_0
- :cond_2
- return-void
- :cond_3
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string p2, "closed"
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_3
- :goto_2
- throw p1
- :goto_3
- goto :goto_2
- .end method
- .method public timeout()Lokio/Timeout;
- .locals 1
- iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;
- move-result-object v0
- return-object v0
- .end method
- .method public toString()Ljava/lang/String;
- .locals 2
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "buffer("
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const-string v1, ")"
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
|