Package org.eclipse.jetty.server
Class MultiPartInputStreamParser.MultiPart
java.lang.Object
org.eclipse.jetty.server.MultiPartInputStreamParser.MultiPart
- All Implemented Interfaces:
jakarta.servlet.http.Part
- Enclosing class:
- MultiPartInputStreamParser
public class MultiPartInputStreamParser.MultiPart
extends Object
implements jakarta.servlet.http.Part
-
Field Summary
Modifier and TypeFieldDescriptionprotected ByteArrayOutputStream2
protected String
protected File
protected String
protected String
protected OutputStream
protected long
protected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanUp()
Only remove tmp files.protected void
close()
protected void
void
delete()
Remove the file, whether or not Part.write() was called on it (ie no longer temporary)byte[]
getBytes()
Get the filename from the content-disposition.getFile()
Get the filegetHeaders
(String name) getName()
long
getSize()
protected void
open()
protected void
setContentType
(String contentType) protected void
setHeaders
(MultiMap<String> headers) toString()
protected void
write
(byte[] bytes, int offset, int length) protected void
write
(int b) void
-
Field Details
-
_name
-
_filename
-
_file
-
_out
-
_bout
-
_contentType
-
_headers
-
_size
protected long _size -
_temporary
protected boolean _temporary
-
-
Constructor Details
-
MultiPart
- Throws:
IOException
-
-
Method Details
-
toString
-
setContentType
-
open
- Throws:
IOException
-
close
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
createFile
- Throws:
IOException
-
setHeaders
-
getContentType
- Specified by:
getContentType
in interfacejakarta.servlet.http.Part
- See Also:
-
Part.getContentType()
-
getHeader
- Specified by:
getHeader
in interfacejakarta.servlet.http.Part
- See Also:
-
Part.getHeader(String)
-
getHeaderNames
- Specified by:
getHeaderNames
in interfacejakarta.servlet.http.Part
- See Also:
-
Part.getHeaderNames()
-
getHeaders
- Specified by:
getHeaders
in interfacejakarta.servlet.http.Part
- See Also:
-
Part.getHeaders(String)
-
getInputStream
- Specified by:
getInputStream
in interfacejakarta.servlet.http.Part
- Throws:
IOException
- See Also:
-
Part.getInputStream()
-
getSubmittedFileName
- Specified by:
getSubmittedFileName
in interfacejakarta.servlet.http.Part
- See Also:
-
Part.getSubmittedFileName()
-
getBytes
public byte[] getBytes() -
getName
- Specified by:
getName
in interfacejakarta.servlet.http.Part
- See Also:
-
Part.getName()
-
getSize
public long getSize()- Specified by:
getSize
in interfacejakarta.servlet.http.Part
- See Also:
-
Part.getSize()
-
write
- Specified by:
write
in interfacejakarta.servlet.http.Part
- Throws:
IOException
- See Also:
-
Part.write(String)
-
delete
Remove the file, whether or not Part.write() was called on it (ie no longer temporary)- Specified by:
delete
in interfacejakarta.servlet.http.Part
- Throws:
IOException
- See Also:
-
Part.delete()
-
cleanUp
Only remove tmp files.- Throws:
IOException
- if unable to delete the file
-
getFile
Get the file- Returns:
- the file, if any, the data has been written to.
-
getContentDispositionFilename
Get the filename from the content-disposition.- Returns:
- null or the filename
-