/* Ċ Ġ* ĠCopyright Ġ 2 0 1 7 ĠPr ong h orn ĠTechnology ĠLLC Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġtech . pr ong h orn . http . protocol Ċ Ċ import Ġtech . pr ong h orn . util . finder .* Ċ Ċ public Ġinterface ĠHttpRequest Header Ġ: ĠByte Back ed Ġ{ ĊĠĠĠ Ġpublic Ġfun Ġget Header Name (): ĠString Ċ } Ċ Ċ public Ġclass ĠInstance HttpRequest Header ( private Ġval Ġvalue : ĠByteArray ) Ġ: ĠHttpRequest Header Ġ{ ĊĠĠĠ Ġconstructor ( name : ĠString ) Ġ: Ġthis ( name . toByteArray ( Charsets . US _ ASCII )) ĊĊĠĠĠ Ġoverride Ġval Ġbytes Ġ= ĠByteArray ( 0 ) ĊĊĠĠĠ Ġoverride Ġfun Ġget Header Name (): ĠString Ġ= Ġvalue . toString () Ċ } Ċ Ċ public Ġenum Ġclass ĠStandard HttpRequest Headers ( private Ġval ĠdisplayName : ĠString ) Ġ: ĠHttpRequest Header Ġ{ ĊĠĠĠ ĠAccept (" Accept "), ĊĠĠĠ ĠAccept Charset (" Accept - Charset "), ĊĠĠĠ ĠAccept Encoding (" Accept - Encoding "), ĊĠĠĠ ĠAccept Language (" Accept - Language "), ĊĠĠĠ ĠAccept Datetime (" Accept - Datetime "), ĊĠĠĠ ĠAuthorization (" Authorization "), ĊĠĠĠ ĠCache Control (" Cache - Control "), ĊĠĠĠ ĠConnection (" Connection "), ĊĠĠĠ ĠCookie (" Cookie "), ĊĠĠĠ ĠContent Length (" Content - Length "), ĊĠĠĠ ĠContent MD 5 (" Content - MD 5 "), ĊĠĠĠ ĠContentType (" Content - Type "), ĊĠĠĠ ĠDate (" Date "), ĊĠĠĠ ĠExpect (" Expect "), ĊĠĠĠ ĠFor warded (" Forwarded "), ĊĠĠĠ ĠFrom (" From "), ĊĠĠĠ ĠHost (" Host "), ĊĠĠĠ ĠIf Match (" If - Match "), ĊĠĠĠ ĠIf Modified Since (" If - Modified - Since "), ĊĠĠĠ ĠIf None Match (" If - None - Match "), ĊĠĠĠ ĠIf Range (" If - Range "), ĊĠĠĠ ĠIf Un modified Since (" If - Un modified - Since "), ĊĠĠĠ ĠMax For wards (" Max - For wards "), ĊĠĠĠ ĠOrigin (" Origin "), ĊĠĠĠ ĠP rag ma (" Pr agma "), ĊĠĠĠ ĠProxy Authorization (" Proxy - Authorization "), ĊĠĠĠ ĠRange (" Range "), ĊĠĠĠ ĠRefer er (" Refer er "), ĊĠĠĠ ĠTE (" TE "), ĊĠĠĠ ĠUser Agent (" User - Agent "), ĊĠĠĠ ĠUpgrade (" Upgrade "), ĊĠĠĠ ĠUpgrade In secure Requests (" Upgrade - In secure - Requests "), ĊĠĠĠ ĠV ia (" Via "), ĊĠĠĠ ĠWarning (" Warning "); ĊĊĠĠĠ Ġpublic Ġval Ġparse Name : ĠString Ġ= ĠdisplayName . toLowerCase () ĊĠĠĠ Ġpublic Ġval Ġdisplay Bytes : ĠByteArray Ġ= ĠdisplayName . toByteArray ( Charsets . US _ ASCII ) ĊĠĠĠ Ġoverride Ġval Ġbytes : ĠByteArray Ġ= Ġparse Name . toByteArray () ĊĊĠĠĠ Ġoverride Ġfun Ġget Header Name (): ĠString Ġ= ĠdisplayName ĊĊĠĠĠ Ġcompanion Ġobject Ġ: ĠByte Back ed Finder < HttpRequest Header > Ġby Ġstandard Header Finder Ċ } Ċ Ċ private Ġval Ġstandard Header Finder Ġ= ĠFin der Generator . generate Finder ( Standard HttpRequest Headers . values ()) Ċ