Package com.intellectualsites.paster
Class IncendoPaster
java.lang.Object
com.intellectualsites.paster.IncendoPaster
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple class that represents a paste file -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringUpload service URLstatic final Collection<String>Valid paste applications -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a file to the paster.voidvoidstatic StringdebugPaste(File logFile, String debugInfo, File... extraFiles) Automatically create a new debugpaste and upload it.static StringdebugPaste(File logFile, String debugInfo, List<File> extraFiles) Automatically create a new debugpaste and upload it.getFiles()Get an immutable collection containing all the files that have been added to this pasterfinal Stringupload()Upload the paste and return the status message
-
Field Details
-
UPLOAD_PATH
Upload service URL- See Also:
-
VALID_APPLICATIONS
Valid paste applications
-
-
Constructor Details
-
IncendoPaster
Construct a new paster- Parameters:
pasteApplication- The application that is sending the paste
-
-
Method Details
-
debugPaste
public static String debugPaste(@Nonnull File logFile, @Nullable String debugInfo, @Nullable File... extraFiles) throws IOException Automatically create a new debugpaste and upload it. Returns the URL.- Parameters:
logFile- the log filedebugInfo- extra implementation-specific informationextraFiles- extra files to be added to the paste- Returns:
- URL of the paste
- Throws:
IOException- if upload failed
-
debugPaste
public static String debugPaste(@Nonnull File logFile, @Nullable String debugInfo, @Nullable List<File> extraFiles) throws IOException Automatically create a new debugpaste and upload it. Returns the URL.- Parameters:
logFile- the log filedebugInfo- extra implementation-specific informationextraFiles- extra files to be added to the paste- Returns:
- URL of the paste
- Throws:
IOException- if upload failed
-
getFiles
Get an immutable collection containing all the files that have been added to this paster- Returns:
- Unmodifiable collection
-
addFile
- Throws:
IOException
-
addFile
- Throws:
IOException
-
addFile
Add a file to the paster. Bypasses "checks" and IP cleansing.- Parameters:
file- File to paste
-
upload
Upload the paste and return the status message- Returns:
- Status message
- Throws:
Throwable- any and all exceptions
-