INNER CODE UNIT · Java

part_data_end

proninyaroslav/libretorrent · app/src/main/java/org/nanohttpd/NanoHTTPD.java:599

                    int part_data_end = boundary_idxs[bi + 1] - 4;
                    fbuf.position(part_data_start);
                    if (content_type == null) {
                        // Read the part into a string
                        byte[] data_bytes = new byte[part_data_end - part_data_start];
                        fbuf.get(data_bytes);
                        parms.put(part_name, new String(data_bytes, encoding));
                    } else {
                        // Read it into a file
                        String path = saveTmpFile(fbuf, part_data_start, part_data_end - part_data_start, file_name);
                        if (!files.containsKey(part_name)) {
                            files.put(part_name, path);
                        } else {
                            int count = 2;
                            while (files.containsKey(part_name + count)) {
                                count++;
                            }
                            files.put(part_name + count, path);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…