{"record":{"id":"52a2d7903bcb1f0b","repo":"lingochamp/FileDownloader","slug":"since-the-provided-filedownloadoutputstream-does-n","errorCode":null,"errorMessage":"Since the provided FileDownloadOutputStream does not support the seek function, if FileDownloader pre-allocates file size at the beginning of the download, it will can not be resumed from the breakpoint. If you need to ensure that the resumption is available, please add and set the value of 'file.non-pre-allocation' field to 'true'","messagePattern":"Since the provided FileDownloadOutputStream does not support the seek function, if FileDownloader pre-allocates file size at the beginning of the download, it will can not be resumed from the breakpoint\\. If you need to ensure that the resumption is available, please add and set the value of 'file\\.non-pre-allocation' field to 'true'","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"library/src/main/java/com/liulishuo/filedownloader/services/DownloadMgrInitialParams.java","lineNumber":290,"sourceCode":"            }\n            return this;\n        }\n\n        /**\n         * Customize the output stream component.\n         * <p>\n         * If you don't customize the output stream component, we use the result of\n         * {@link #createDefaultOutputStreamCreator()} as the default one.\n         *\n         * @param creator The output stream creator is used for creating\n         *                {@link FileDownloadOutputStream} which is used to write the input stream\n         *                to the file for downloading.\n         */\n        public InitCustomMaker outputStreamCreator(FileDownloadHelper.OutputStreamCreator creator) {\n            this.mOutputStreamCreator = creator;\n            if (mOutputStreamCreator != null && !mOutputStreamCreator.supportSeek()) {\n                if (!FileDownloadProperties.getImpl().fileNonPreAllocation) {\n                    throw new IllegalArgumentException(\n                            \"Since the provided FileDownloadOutputStream \"\n                                    + \"does not support the seek function, if FileDownloader\"\n                                    + \" pre-allocates file size at the beginning of the download,\"\n                                    + \" it will can not be resumed from the breakpoint. If you need\"\n                                    + \" to ensure that the resumption is available, please add and\"\n                                    + \" set the value of 'file.non-pre-allocation' field to 'true'\"\n                                    + \" in the 'filedownloader.properties' file which is in your\"\n                                    + \" application assets folder manually for resolving this \"\n                                    + \"problem.\");\n                }\n            }\n            return this;\n        }\n\n        /**\n         * Customize the connection component.\n         * <p>\n         * If you don't customize the connection component, we use the result of","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/lingochamp/FileDownloader/blob/6237a8cac174bcc916e4342b14ab1ab72a5768d4/library/src/main/java/com/liulishuo/filedownloader/services/DownloadMgrInitialParams.java#L272-L308","documentation":"Error \"Since the provided FileDownloadOutputStream does not support the seek function, if FileDownloader pre-allocates file size at the beginning of the download, it will can not be resumed from the breakpoint. If you need to ensure that the resumption is available, please add and set the value of 'file.non-pre-allocation' field to 'true'\" thrown in lingochamp/FileDownloader.","triggerScenarios":"Thrown at library/src/main/java/com/liulishuo/filedownloader/services/DownloadMgrInitialParams.java:290 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set 'file.non-pre-allocation=true' in filedownloader.properties (or via InitCustomMaker) to skip pre-allocation so downloads can resume from breakpoints with non-seekable streams","Provide a FileDownloadOutputStream implementation that supports seek() and set it through outputStreamCreator(...) so pre-allocation remains safe","Use the default FileDownloadOutputStream (based on RandomAccessFile) which supports seeking"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6237a8cac174bcc916e4342b14ab1ab72a5768d4","analyzedAt":"2026-09-08T23:50:48.168Z","contentChangedAt":"2026-09-08T23:50:48.168Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}