validate() — netty Function Reference
Architecture documentation for the validate() function in DefaultFileRegion.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 7cf04b92_1a1a_0e5e_312a_55f4e2c4f328["validate()"] 2525a814_0b60_9da3_6f4c_3129cbf6980c["DefaultFileRegion"] 7cf04b92_1a1a_0e5e_312a_55f4e2c4f328 -->|defined in| 2525a814_0b60_9da3_6f4c_3129cbf6980c bae3c5c8_62a5_1c82_ede3_eb8ba7bb58ba["transferTo()"] bae3c5c8_62a5_1c82_ede3_eb8ba7bb58ba -->|calls| 7cf04b92_1a1a_0e5e_312a_55f4e2c4f328 style 7cf04b92_1a1a_0e5e_312a_55f4e2c4f328 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/DefaultFileRegion.java lines 181–191
static void validate(DefaultFileRegion region, long position) throws IOException {
// If the amount of written data is 0 we need to check if the requested count is bigger then the
// actual file itself as it may have been truncated on disk.
//
// See https://github.com/netty/netty/issues/8868
long size = region.file.size();
long count = region.count - position;
if (region.position + count + position > size) {
throw new IOException("Underlying file size " + size + " smaller then requested count " + region.count);
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does validate() do?
validate() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/DefaultFileRegion.java.
Where is validate() defined?
validate() is defined in transport/src/main/java/io/netty/channel/DefaultFileRegion.java at line 181.
What calls validate()?
validate() is called by 1 function(s): transferTo.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free