sunlabs.brazil.handler

Class PushHandler.Split

public static class PushHandler.Split extends Object

Split multipart data into its constituent pieces. Use byte[] so we can handle (potentially) large amounts of binary data. This acts as an iterator, stepping through the parts, extracting the appropriate info for eacxh part.
Constructor Summary
Split(byte[] bytes)
create a new multipart form thingy
Method Summary
Stringcontent()
Get the content as a string
Stringheader()
Return the header as a string
intlength()
Return the content length
Stringname()
get the part name
booleannextPart()
Return true if there is a next part
intstart()
return the index into the start of the data for this part

Constructor Detail

Split

public Split(byte[] bytes)
create a new multipart form thingy

Method Detail

content

public String content()
Get the content as a string

header

public String header()
Return the header as a string

length

public int length()
Return the content length

name

public String name()
get the part name

nextPart

public boolean nextPart()
Return true if there is a next part

start

public int start()
return the index into the start of the data for this part