< prev index next > src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java
Print this page
/*
- * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
throw new FileSystemException(getName() + " is not file");
return Files.readAllBytes(path);
}
@Override
- public List<Node> getChildren() {
+ public Stream<String> getChildNames() {
if (!isDirectory())
- throw new IllegalArgumentException("not a directory: " + getNameString());
+ throw new IllegalArgumentException("not a directory: " + getName());
if (children == null) {
List<Node> list = new ArrayList<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) {
for (Path p : stream) {
p = explodedModulesDir.relativize(p);
} catch (IOException x) {
return null;
}
children = list;
}
- return children;
+ return children.stream().map(Node::getName);
}
@Override
public long size() {
try {
< prev index next >