Loading…
Loading…
Java
The advanced-libraries companion to Core Java I: streams, files, regular expressions, XML, networking, databases, date & time, internationalisation, security, desktop UIs and the Foreign Function and Memory API. Targets Java 25.
Cancel blocked network operations and secure connections: why interrupt doesn't unblock a Socket on a platform thread, SocketChannel and ClosedByInterruptException, virtual threads, then TLS with SSLSocket and SSLServerSocket, certificates, keystores, trust stores and SSLContext.
kvi5hnuCode Sprout team member9 minWrite TCP servers in Java: ServerSocket, binding and backlog, the accept loop, an echo server, serving many clients concurrently with one virtual thread per connection, half-closing a connection with shutdownOutput, and shutting a server down cleanly.
kvi5hnuCode Sprout team member9 minConnect to network services from Java: ports and TCP connections, experimenting with telnet and netcat, Socket with input and output streams, connect and read timeouts, ConnectException, InetAddress and InetSocketAddress, address literals with ofLiteral, and a glimpse of UDP.
kvi5hnuCode Sprout team member10 minTurn XML into HTML, text or other XML with XSLT 1.0 from Java: templates and match patterns, apply-templates, value-of, for-each, sort, if and choose, variables and parameters, Templates and Transformer, Source and Result types, a flat file as SAX events, and secure settings.
kvi5hnuCode Sprout team member9 minProduce correct XML from Java: build DOM trees with createElement(NS), setAttribute(NS) and text, CDATA and comment nodes, serialize them with the identity Transformer and output properties or LSSerializer, and stream XML directly with XMLStreamWriter, including namespaces and escaping.
kvi5hnuCode Sprout team member8 minProcess large XML documents without building a tree: SAX callbacks with DefaultHandler, startElement, characters and endElement, StAX pull parsing with XMLStreamReader and XMLEventReader, getElementText, skipping subtrees, filters, factory properties and safe settings.
kvi5hnuCode Sprout team member10 minHow XML namespaces keep element names apart: namespace URIs, xmlns prefixes and default namespaces, scoping and attributes, namespace-aware DOM parsing with newNSInstance, getNamespaceURI and getLocalName, getElementsByTagNameNS, and XPath with a NamespaceContext.
kvi5hnuCode Sprout team member8 minLocate data in XML with XPath 1.0 from Java: location paths, // and predicates, attributes, axes, unions, functions like count, sum, contains and normalize-space, typed results with evaluateExpression and XPathNodes, compiled expressions, variables against injection, and errors.
kvi5hnuCode Sprout team member10 minValidate XML against an XML Schema (XSD) in Java: simple and complex types, restrictions with enumerations and patterns, sequence, choice, groups, occurrence limits, attribute defaults, SchemaFactory, Validator and setSchema, plus a config file that builds objects.
kvi5hnuCode Sprout team member10 minDescribe and check XML structure with a DTD: internal and external DOCTYPE declarations, element content rules, #PCDATA and mixed content, ATTLIST types and defaults, ID and IDREF, entities, validating DOM parsers that drop whitespace, error handlers, and XML catalogs.
kvi5hnuCode Sprout team member11 minRead XML into a DOM tree with DocumentBuilderFactory and DocumentBuilder, walk Node, Element, Text and Attr objects, cope with whitespace text nodes, search with getElementsByTagName, and parse untrusted XML safely against XXE and entity-expansion attacks.
kvi5hnuCode Sprout team member11 minWhat XML is and how a document is built: the prolog and root element, elements, attributes and text, when to prefer elements over attributes, entity and character references, CDATA, comments and processing instructions, the well-formedness rules, and Java's XML APIs.
kvi5hnuCode Sprout team member11 minSplit and rewrite text with Java regular expressions: split limits and empty strings, splitAsStream, splitWithDelimiters, Scanner delimiters, replaceAll with $n and ${name}, quoteReplacement, replacement functions, appendReplacement, and every Pattern flag with its inline form.
kvi5hnuCode Sprout team member8 minPut Java regular expressions to work with Pattern and Matcher: matches, lookingAt and find, predicates for streams, iterating with find and results(), Scanner.findAll, numbered and named groups, namedGroups, MatchResult snapshots, regions and \G.
kvi5hnuCode Sprout team member9 minThe java.util.regex pattern language: literals and metacharacters, character classes with ranges, negation and intersection, \d \w \s and Unicode \p{...} classes, greedy, reluctant and possessive quantifiers, groups and back-references, boundaries, lookaround, and escaping.
kvi5hnuCode Sprout team member11 minKeep serialized Java objects correct over time and safe: readResolve and writeReplace with the serialization proxy pattern, serialVersionUID and serialver, how fields are matched between versions, ObjectInputValidation, deserialization filters, and deep copying by serialization.
kvi5hnuCode Sprout team member12 minControl what Java serialization saves: transient fields, private writeObject/readObject hooks with defaultWriteObject, serialPersistentFields with PutField/GetField, Externalizable with its public no-arg constructor, and how records are rebuilt through their canonical constructor.
kvi5hnuCode Sprout team member11 minRead a Java serialization stream byte by byte: the AC ED magic number, TC_ type codes, class descriptors with serialVersionUID fingerprints and flags, field type codes, object handles and back-references, null markers, block data, and what ObjectStreamClass reports.
kvi5hnuCode Sprout team member11 minSave and restore object graphs with Java serialization: ObjectOutputStream.writeObject, ObjectInputStream.readObject, the Serializable marker interface, shared references and serial numbers, non-serializable superclasses, NotSerializableException, and when to avoid it.
kvi5hnuCode Sprout team member9 minCoordinate processes that share a file with Java's FileChannel.lock and tryLock: exclusive and shared locks, locking regions, releasing with try-with-resources, a locked read-modify-write update, OverlappingFileLockException, and the platform caveats such as advisory locks on Linux.
kvi5hnuCode Sprout team member8 min