Package java.io

Examples of java.io.UncheckedIOException


    private static Runnable asUncheckedRunnable(Closeable c) {
        return () -> {
            try {
                c.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        };
    }
View Full Code Here


                @Override
                public boolean hasNext() {
                    try {
                        return delegate.hasNext();
                    } catch (DirectoryIteratorException e) {
                        throw new UncheckedIOException(e.getCause());
                    }
                }
                @Override
                public Path next() {
                    try {
                        return delegate.next();
                    } catch (DirectoryIteratorException e) {
                        throw new UncheckedIOException(e.getCause());
                    }
                }
            };

            return StreamSupport.stream(Spliterators.spliteratorUnknownSize(it, Spliterator.DISTINCT), false)
View Full Code Here

    static Stream<String> lines(Path p) {
        try {
            return Files.lines(p);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

   
    static Stream<String> lines(Path p) {
        try {
            return Files.lines(p);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                throw new FileAlreadyExistsException(file.getPath());
            }
            return new RandomAccessFile(file, "rw").getChannel().
                    map(FileChannel.MapMode.READ_WRITE, 0, Character.SIZE / Byte.SIZE * capacity);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                throw new FileAlreadyExistsException(file.getPath());
            }
            return new RandomAccessFile(file, "rw").getChannel().
                    map(FileChannel.MapMode.READ_WRITE, 0, Double.SIZE / Byte.SIZE * capacity);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                throw new FileAlreadyExistsException(file.getPath());
            }
            return new RandomAccessFile(file, "rw").getChannel().
                    map(FileChannel.MapMode.READ_WRITE, 0, capacity);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                throw new FileAlreadyExistsException(file.getPath());
            }
            return new RandomAccessFile(file, "rw").getChannel().
                    map(FileChannel.MapMode.READ_WRITE, 0, Long.SIZE / Byte.SIZE * capacity);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                throw new FileAlreadyExistsException(file.getPath());
            }
            return new RandomAccessFile(file, "rw").getChannel().
                    map(FileChannel.MapMode.READ_WRITE, 0, Float.SIZE / Byte.SIZE * capacity);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                throw new FileAlreadyExistsException(file.getPath());
            }
            return new RandomAccessFile(file, "rw").getChannel().
                    map(FileChannel.MapMode.READ_WRITE, 0, Short.SIZE / Byte.SIZE * capacity);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

TOP

Related Classes of java.io.UncheckedIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.