You are on page 1of 49

Java pocket guide Fourth Edition

Robert Liguori
Visit to download the full and correct content document:
https://textbookfull.com/product/java-pocket-guide-fourth-edition-robert-liguori/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Java 8 Pocket Guide Instant Help for Java Programmers


1st Edition Liguori Robert Liguori Patricia

https://textbookfull.com/product/java-8-pocket-guide-instant-
help-for-java-programmers-1st-edition-liguori-robert-liguori-
patricia/

Pocket Rough Guide Paris Fourth Edition Rough Guides

https://textbookfull.com/product/pocket-rough-guide-paris-fourth-
edition-rough-guides/

Pocket Rough Guide London Fourth Edition Samantha Cook

https://textbookfull.com/product/pocket-rough-guide-london-
fourth-edition-samantha-cook/

Java EE 6 Pocket Guide A Quick Reference for Simplified


Enterprise Java Development 1st Edition Gupta Arun

https://textbookfull.com/product/java-ee-6-pocket-guide-a-quick-
reference-for-simplified-enterprise-java-development-1st-edition-
gupta-arun/
Java Network Programming Fourth Edition Harold Elliotte

https://textbookfull.com/product/java-network-programming-fourth-
edition-harold-elliotte/

Java Closures and Lambda Fischer Robert

https://textbookfull.com/product/java-closures-and-lambda-
fischer-robert/

Questions and Answers A Guide to Fitness and Wellness


Gary Liguori

https://textbookfull.com/product/questions-and-answers-a-guide-
to-fitness-and-wellness-gary-liguori/

Questions and Answers: A Guide to Fitness and Wellness


Gary Liguori

https://textbookfull.com/product/questions-and-answers-a-guide-
to-fitness-and-wellness-gary-liguori-2/

Beginning Java with WebSphere Expert s Voice in Java


Janson Robert W

https://textbookfull.com/product/beginning-java-with-websphere-
expert-s-voice-in-java-janson-robert-w/
4t
Co

h
ve

Ed
Java
rs

iti
Ja

on
va
8
&
9
Pocket Guide
INSTANT HELP FOR JAVA PROGRAMMERS

Robert Liguori &


Patricia Liguori
FOURTH EDITION

Java Pocket Guide

Robert Liguori and Patricia Liguori


Java Pocket Guide
by Robert Liguori and Patricia Liguori
Copyright ©2017 Gliesian, LLC. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebasto‐
pol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promo‐
tional use. Online editions are also available for most titles (http://oreilly.com/
safari). For more information, contact our corporate/institutional sales
department: 800-998-9938 or corporate@oreilly.com.

Editor: Brian Foster


Production Editor: Justin Billing
Copyeditor: Amanda Kersey
Proofreader: Marta Justak
Indexer: Ellen Troutman-Zaig
Interior Designer: David Futato
Cover Designer: Karen Montgomery
Illustrator: Rebecca Demarest
September 2017: Fourth Edition
Revision History for the Fourth Edition
2017-08-25: First Release
2017-11-10: Second Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491938690 for release
details.

The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Java Pocket
Guide, the cover image, and related trade dress are trademarks of O’Reilly
Media, Inc.
While the publisher and the authors have used good faith efforts to ensure
that the information and instructions contained in this work are accurate, the
publisher and the authors disclaim all responsibility for errors or omissions,
including without limitation responsibility for damages resulting from the use
of or reliance on this work. Use of the information and instructions contained
in this work is at your own risk. If any code samples or other technology this
work contains or describes is subject to open source licenses or the intellec‐
tual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.

978-1-491-93869-0
[LSI]
This book is dedicated to our beautiful daughter, Ashleigh.
Table of Contents

Preface xiii

Part I. Language

Chapter 1: Naming Conventions 3


Acronyms 3
Annotation Names 3
Class Names 4
Constant Names 4
Enumeration Names 4
Generic Type Parameter Names 5
Instance and Static Variable Names 5
Interface Names 5
Method Names 5
Package Names 6
Module Names 6
Parameter and Local Variable Names 6

Chapter 2: Lexical Elements 9

v
Unicode and ASCII 9
Compact Strings 11
Comments 12
Keywords 13
Identifiers 14
Separators 14
Operators 15
Literals 17
Escape Sequences 20
Unicode Currency Symbols 21

Chapter 3: Fundamental Types 23


Primitive Types 23
Literals for Primitive Types 24
Floating-Point Entities 26
Numeric Promotion of Primitive Types 28
Wrapper Classes 30
Autoboxing and Unboxing 31

Chapter 4: Reference Types 35


Comparing Reference Types to Primitive Types 36
Default Values 36
Conversion of Reference Types 38
Converting Between Primitives and Reference Types 40
Passing Reference Types into Methods 40
Comparing Reference Types 41
Copying Reference Types 44
Memory Allocation and Garbage Collection of Reference
Types 46

Chapter 5: Object-Oriented Programming 47


Classes and Objects 47

vi | Table of Contents
Variable-Length Argument Lists 54
Abstract Classes and Abstract Methods 55
Static Data Members, Static Methods, Static Constants, and
Static Initializers 56
Interfaces 58
Enumerations 59
Annotation Types 59
Functional Interfaces 62

Chapter 6: Statements and Blocks 63


Expression Statements 63
Empty Statement 64
Blocks 64
Conditional Statements 64
Iteration Statements 66
Transfer of Control 68
Synchronized Statement 70
Assert Statement 70
Exception Handling Statements 71

Chapter 7: Exception Handling 73


The Exception Hierarchy 73
Checked/Unchecked Exceptions and Errors 74
Common Checked/Unchecked Exceptions and Errors 75
Exception Handling Keywords 78
The Exception Handling Process 83
Defining Your Own Exception Class 83
Printing Information About Exceptions 84

Chapter 8: Java Modifiers 87


Access Modifiers 88
Other (Nonaccess) Modifiers 89

Table of Contents | vii


Modifiers Encoding 90

Part II. Platform

Chapter 9: Java Platform, Standard Edition 95


Common Java SE API Libraries 95

Chapter 10: Development Basics 109


Java Runtime Environment 109
Java Development Kit 109
Java Program Structure 110
Command-Line Tools 112
Classpath 118

Chapter 11: Memory Management 119


Garbage Collectors 119
Memory Management Tools 121
Command-Line Options 122
Resizing the JVM Heap 125
Metaspace 125
Interfacing with the GC 126

Chapter 12: Basic Input and Output 129


Standard Streams in, out, and err 129
Class Hierarchy for Basic Input and Output 130
File Reading and Writing 131
Socket Reading and Writing 133
Serialization 135
Zipping and Unzipping Files 136

Chapter 13: New I/O API (NIO.2) 139


The Path Interface 139

viii | Table of Contents


The Files Class 140
Additional Features 141

Chapter 14: Concurrency 143


Creating Threads 143
Thread States 145
Thread Priorities 145
Common Methods 145
Synchronization 147
Concurrent Utilities 148

Chapter 15: Java Collections Framework 153


The Collection Interface 153
Implementations 154
Collection Framework Methods 155
Collections Class Algorithms 155
Algorithm Efficiencies 156
Comparator Functional Interface 158
Convenience Factory Methods 161

Chapter 16: Generics Framework 163


Generic Classes and Interfaces 163
Constructors with Generics 165
Substitution Principle 165
Type Parameters, Wildcards, and Bounds 166
The Get and Put Principle 167
Generic Specialization 168
Generic Methods in Raw Types 169

Chapter 17: The Java Scripting API 171


Scripting Languages 171
Script Engine Implementations 171

Table of Contents | ix
Setting Up Scripting Languages and Engines 174

Chapter 18: Date and Time API 179


Legacy Interoperability 180
Regional Calendars 180
ISO Calendar 181

Chapter 19: Lambda Expressions 189


λEs Basics 189
Specific-Purpose Functional Interfaces 192
General-Purpose Functional Interfaces 193
Resources for λEs 195

Chapter 20: JShell: the Java Shell 197


Getting Started 197
Snippets 198
Using JShell 199
JShell Features 207
Summary of JShell Commands 212

Chapter 21: Java Module System 215


Project Jigsaw 215
Java Modules 216
Compiling Modules 218
Modular JDK 220
jdeps 222
Defining a Module 224
Exporting a Package 224
Declaring Dependencies 225
Transitive Dependencies 226
Defining Service Providers 226

x | Table of Contents
jlink 229

Part III. Appendixes

A. Fluent APIs 233

B. Third-Party Tools 235

C. UML Basics 245

Index 255

Table of Contents | xi
Preface

Designed to be your companion, this Pocket Guide provides a


quick reference to the standard features of the Java program‐
ming language and its platform.
This Pocket Guide provides you with the information you will
need while developing or debugging your Java programs,
including helpful programming examples, tables, figures, and
lists.
Java coverage in this book is representative through Java SE 9
incorporating a subset of the 80+ JDK Enhancement Proposals
(JEPs) slated for the release. This Java coverage includes
improvements to the generage language as well as coverage of
the new Java Shell and the new Java Module System. This book
supercedes the three previous versions: Java Pocket Guide, Java
7 Pocket Guide, and Java 8 Pocket Guide.
For uniformity and enhanced interest, the majority of the code
examples in this fourth edition of the Java Pocket Guide have
been updated from code segments of the Gliesians Web Appli‐
cation. At the time of this writing, the primary focus of the
Gliesians Web Application is to provide free utilities relative to
genealogy and small unmanned aerial systems.
The material in this book also provides support in preparing
for the Oracle Certified Programmer exams. If you are consid‐

xiii
ering pursuing one of the Java certifications, you may also wish
to acquire the OCA Java SE 8 Programmer I Study Guide (Exam
1Z0-808) by Edward Finegan and Robert Liguori (McGraw-
Hill Osborne Media, 2015).

Book Structure
This book is broken into three parts: Part I details the Java pro‐
gramming language as derived from the Java Language Specifi‐
cation (JLS) and JEPs. Part II details Java platform components
and related topics. Part III is the appendixes covering support‐
ing technologies.

Conventions Used in This Book


The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames,
and file extensions.
Constant width
Used for program listings, as well as within paragraphs to
refer to program elements such as variable or function
names, databases, data types, environment variables, state‐
ments, and keywords.
Constant width bold
Shows commands or other text that should be typed liter‐
ally by the user.
Constant width italic
Shows text that should be replaced with user-supplied val‐
ues or by values determined by context.

TIP
This element signifies a tip, suggestion, or general note.

xiv | Preface
WARNING
This element indicates a warning or caution.

O’Reilly Safari

Safari (formerly Safari Books


Online) is a membership-based
training and reference platform for
enterprise, government, educators, and individuals.

Members have access to thousands of books, training videos,


Learning Paths, interactive tutorials, and curated playlists from
over 250 publishers, including O’Reilly Media, Harvard Busi‐
ness Review, Prentice Hall Professional, Addison-Wesley Pro‐
fessional, Microsoft Press, Sams, Que, Peachpit Press, Adobe,
Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan
Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apr‐
ess, Manning, New Riders, McGraw-Hill, Jones & Bartlett, and
Course Technology, among others.
For more information, please visit http://oreilly.com/safari.

How to Contact Us
Please address comments and questions concerning this book
to the publisher:

O’Reilly Media, Inc.


1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

Preface | xv
We have a web page for this book, where we list errata, exam‐
ples, and any additional information. You can access this page
at http://bit.ly/java-pocket-guide-4e.
To comment or ask technical questions about this book, send
email to bookquestions@oreilly.com.
For more information about our books, courses, conferences,
and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments
We extend a special thank you to all the folks at O’Reilly.
Appreciation of support also goes out to Greg Grockenberger
and Ryan Cuprak, who wrote for the JShell and Java Module
System chapters, respectively. Ryan also performed the techni‐
cal review of the book, which we appreciate.
We would also like to thank again all of those who participated
with the original Java Pocket Guide, the Java 7 Pocket Guide,
and the Java 8 Pocket Guide.
Additional appreciation to people not related to this book
project: Don Anderson, David Chong, Keith Cianfrani, Jay
Clark, Steve Cullen, Ed DiCampli, Phil Greco, Scott Houck,
Cliff Johnson, Juan Keller, Fran Kelly, Mike Krauss, Mike Lazlo,
Phil Maloney, Lana Manovych, Matt Mariani, Chris Martino,
Roe Morande, Sohrob Mottaghi, Brendan Nugent, Keith Sma‐
niotto, Tom Tessitore, Lacey Thompson, Tyler Travis, Justin
Trulear, and Jack Wombough.
We would finally like to thank all of our family members for
always being there for us.

xvi | Preface
PART I
Language
CHAPTER 1
Naming Conventions

Naming conventions are used to make Java programs more


readable. It is important to use meaningful and unambiguous
names comprised of Java letters. The following examples are
from various Java sources.

Acronyms
When using acronyms in names, only the first letter of the
acronym should be uppercase and only when uppercase is
appropriate:
// e.g., DNA is represented as Dna
public class GliesianDnaProvider {...}

// e.g., Most Recent Common Ancestor (MRCA) is Mrca


public class MrcaCalculator {...}

Annotation Names
Annotation names have been presented several ways in the Java
SE API for predefined annotation types, [adjective|verb]
[noun]:
@Documented
@Retention(RetentionPolicy.RUNTIME)

3
@Target(ElementType.TYPE)
public @interface FunctionalInterface {}

Class Names
Class names should be nouns, as they represent “things” or
“objects.” They should be mixed case (camel case) with only the
first letter of each word capitalized, as in the following:
public class AirDensityCalculator {...}

Constant Names
Constant names should be all uppercase letters, and multiple
words should be separated by underscores:
private static final double KELVIN = 273.16;
private static final double DRY_AIR_GAS_CONSTANT =
287.058;
private static final double HUMID_AIR_GAS_CONSTANT
= 461.4964;

Enumeration Names
Enumeration names should follow the conventions of class
names. The enumeration set of objects (choices) should be all
uppercase letters:
public enum MeasurementSystem {
METRIC, UNITED_STATES_CUSTOMARY, IMPERIAL
}

public enum Study {


ALL, NON_ENDOGAMOUS, SEMI_ENDOGAMOUS, ENDOGAMOUS
}

public enum RelationshipMatchCategory {


IMMEDIATE, CLOSE, DISTANT, SPECULATIVE
}

4 | Chapter 1: Naming Conventions


Generic Type Parameter Names
Generic type parameter names should be uppercase single let‐
ters. The letter T for type is typically recommended.
The Collections Framework makes extensive use of generics. E
is used for collection elements, S is used for service loaders, and
K and V are used for map keys and values:
public interface Map <K,V> {
V put(K key, V value);
}

Instance and Static Variable Names


Instance and static variable names should be nouns and should
follow the same capitalization convention as method names:
private String prediction;

Interface Names
Interface names should be adjectives. They should end with
“able” or “ible” whenever the interface provides a capability;
otherwise, they should be nouns. Interface names follow the
same capitalization convention as class names:
public interface Relatable {...}
public interface SystemPanel {...}

Method Names
Method names should contain a verb, as they are used to make
an object take action. They should be mixed case, beginning
with a lowercase letter, and the first letter of each subsequent
word should be capitalized. Adjectives and nouns may be
included in method names:
public void clear() {...} // verb
public void toString() // preposition and noun
public double getDryAirDensity() {...} // verb,

Generic Type Parameter Names | 5


adjective and noun
public double getHumidAirDensity() {...} // verb,
adjective and noun

Package Names
Package names should be unique and consist of lowercase let‐
ters. Underscores may be used if necessary:
// Gliesian.com (company), JAirDensity (software)
package com.gliesian.jairdensity;

// Gliesian.com (company), FOREX Calculator (soft


ware), Utilties
package com.gliesian.forex_calculator.utils;
Publicly available packages should be the reversed internet
domain name of the organization, beginning with a single-
word top-level domain name (e.g., com, net, org, or edu), fol‐
lowed by the name of the organization and the project or divi‐
sion. (Internal packages are typically named according to the
project.)
Package names that begin with java and javax are restricted
and can be used only to provide conforming implementations
to the Java class libraries.

Module Names
Module names should be the reversed internet domain name
with the same guidelines as package names:
module com.gliesian.utils {
}

Parameter and Local Variable Names


Parameter and local variable names should be descriptive low‐
ercase single words, acronyms, or abbreviations. If multiple
words are necessary, they should follow the same capitalization
convention as method names:

6 | Chapter 1: Naming Conventions


public void printPredictions (ArrayList predic
tions) {
int counter = 1;
for (String prediction : predictions) {
System.out.println("Predictions #" + counter++
+ ": " + prediction);
}
}
Temporary variable names may be single letters such as i, j, k,
m, and n for integers and c, d, and e for characters. Temporary
and looping variables may be one-character names as shown in
Table 1-1.
Table 1-1. Temporary and looping variables
One-character name Type
b Byte
c Character
d Double
e Exception
f Float
i, j, or k Integer
l Long
o Object
s String

Parameter and Local Variable Names | 7


CHAPTER 2
Lexical Elements

Java source code consists of words or symbols called lexical ele‐


ments, or tokens. Java lexical elements include line terminators,
whitespace, comments, keywords, identifiers, separators, oper‐
ators, and literals. The words or symbols in the Java program‐
ming language are comprised of the Unicode character set.

Unicode and ASCII


Maintained by the Unicode Consortium standards organiza‐
tion, Unicode is the universal character set with the first 128
characters the same as those in the American Standard Code
for Information Interchange (ASCII) character set. Unicode
provides a unique number for each character, usable across all
platforms, programs, and languages. Java SE 9 supports Uni‐
code 8.0.0. You can find more information about the Unicode
Standard in the online manual. Java SE 8 supports Unicode
6.2.0.

9
TIP
Java comments, identifiers, and string literals are not limi‐
ted to ASCII characters. All other Java input elements are
formed from ASCII characters.

The Unicode set version used by a specified version of the Java


platform is documented in the Character class of the Java API.
The Unicode Character Code Chart for scripts, symbols, and
punctuation can be accessed at http://unicode.org/charts/.

Printable ASCII Characters


ASCII reserves code 32 (spaces) and codes 33–126 (letters, dig‐
its, punctuation marks, and a few others) for printable charac‐
ters. Table 2-1 contains the decimal values followed by the cor‐
responding ASCII characters for these codes.
Table 2-1. Printable ASCII characters
32 SP 48 0 64 @ 80 P 96 ' 112 p
33 ! 49 1 65 A 81 Q 97 a 113 q
34 " 50 2 66 B 82 R 98 b 114 r
35 # 51 3 67 C 83 S 99 C 115 S
36 $ 52 4 68 D 84 T 100 d 116 t
37 % 53 5 69 E 85 U 101 e 117 u
38 & 54 6 70 F 86 V 102 f 118 v
39 ' 55 7 71 G 87 W 103 g 119 w
40 ( 56 8 72 H 88 X 104 h 120 x
41 ) 57 9 73 I 89 Y 105 i 121 y
42 * 58 : 74 J 90 Z 106 j 122 z
43 + 59 ; 75 K 91 [ 107 k 123 {
44 , 60 < 76 L 92 \ 108 l 124 |

10 | Chapter 2: Lexical Elements


45 - 61 = 77 M 93 ] 109 m 125 }
46 . 62 > 78 N 94 ^ 110 n 126 ~
47 / 63 ? 79 O 95 _ 111 o

Nonprintable ASCII Characters


ASCII reserves decimal numbers 0–31 and 127 for control char‐
acters. Table 2-2 contains the decimal values followed by the
corresponding ASCII characters for these codes.
Table 2-2. Nonprintable ASCII characters
00 NUL 07 BEL 14 SO 21 NAK 28 FS
01 SOH 08 BS 15 SI 22 SYN 29 GS
02 STX 09 HT 16 DLE 23 ETB 30 RS
03 ETX 10 NL 17 DC1 24 CAN 31 US
04 EOT 11 VT 18 DC2 25 EM 127 DEL
05 ENQ 12 NP 19 DC3 26 SUB
06 ACK 13 CR 20 DC4 27 ESC

TIP
ASCII 10 is a newline or linefeed. ASCII 13 is a carriage
return.

Compact Strings
The compact strings feature is an optimization that allows for a
more space-efficient internal representation of strings. It is
enabled by default in Java 9. This feature may be disabled by
using -XX:-CompactStrings, if you are mainly using UTF-16
strings.

Compact Strings | 11
Another random document with
no related content on Scribd:
hän kinasteli usein merellä isänsä kanssa, Eveliinaa hän karttoi ja
lopuksi hän lähti merille eikä antanut vuosikausiin tietoja itsestään.

Silloin levisi kumma huhu saaristoon. Pari kaupungin pyssymiestä


oli Skytteskärissä löytänyt miehenruumiin. He olivat etsineet
tuulensuojaa kaatuneen kuusen juurakon takaa ja pystyttäneet
siihen telttansa. Koira oli vainunnut jotain maasta ja alkanut murista
ja kaivaa. Sieltä oli ilmestynyt vanttera miehenruumis, jolla oli jalassa
pitkävartiset saappaat ja musta kiharainen tukka.

Vennström kuuli huhun ensi kertaa kaupungin kalarannassa.


Hänen mielestään ihmiset katsoivat häntä oudon tutkivasti
puhuessaan asiasta. Joka puolella hän kuuli arveltavan ettei se
voinut olla kenenkään muun kuin Löf-vainajan ruumis. Sinä päivänä
hän myi kalat polkuhintaan ja lähti kotimatkalle ennen muita.

Merellä hän hengitti taas helpommin. Oliko kaikki tullut ilmi?


Epäilivätkö ihmiset häntä? Hän oli jo alkanut unohtaa — ei, joka
kerta kun hän näki venehylyn, oli hän muistanut kaikki. Kumma ettei
hän ollut saanut sitä puiksi hakatuksi, vaikka oli monta kertaa
päättänyt. Pimeässä se törrötti siinä aitan sivulla kuin mikäkin
kummitus. Huomenna hän sen hakkaa. Ja tänään, suoraa päätä,
hän laskee Skytteskäriin Ei ei käy, joku voi tuntea veneen! Mutta ensi
yönä.

Illalla hän lähettää rengin ja pojan hakemaan tiilikuormaa


Skoglannista. Ilma on siihen sopiva meri melkein tyyni ja on kuuvalo.
Voi sattua ette pitkään aikaan tule niin sopivaa ilmaa, jonkatähden
on
paras tehdä se tiilimatka nyt.
Kun muut ovat nukkuneet lähtee hän Aspön takarannalta pienellä
ruuhella majakkasaareen. Ovatko he jo kuljettaneet ruumiin pois?
Nyt putosi tähti majakan kohdalla ja se tuntuu hänestä niin
harvinaiselta ja salaperäiseltä että täytyy miettiä sitä pitkän aikaa.
Aivan Skytteskärin rannassa kolahtaa airo hänen kädestään. Häntä
harmittaa, kun älyää että se oli vain koskeloperhe, joka oli nukkunut
vesikivellä ja säikähtyneenä lähtenyt lentoon. Hän kulkee hiipien kuin
pelkäisi jonkun heräävän.

Ruumis on vanhalla paikallaan. Se helpottaa mieltä. Mutta koko


ajan tunkiessaan sitä säkkiin, vilkasee hän vähäväliä majakkaan,
jonka silmä vilkkuu puiden välitse. Se rävähyttää niin ilkeästi siellä
ulkonokassa että hänen tekee mieli käydä sammuttamassa se siksi
aikaa kun on toimittanut asiansa. Onhan hänellä avain.

Vihdoin on hän taakkoineen ruuhessa. Kivi ja köysi ovat valmiina.


Mutta viime hetkessä tulee hän ajatelleeksi että merikin antaa
saaliinsa ja tavallisesti juuri silloin, kun sen pitäisi kätkeä jotakin. Hän
upottaa ruumiin ilman säkkiä, sitoen suuren kivenlohkareen toiseen
nilkkaan. Ja kun Löf-vainaa painuu syvyyteen, ajattelee hän, että jos
köysi katkeekin ja ruumis ajautuu maihin, ei kukaan voi päätellä
muuta kuin että hän on hukkunut.

Sinä yönä nukkui Vennström sikeästi kuin olisi saanut raskaan


päivätyön loppuun. Ja seuraavana päivänä hakkasi hän venehylyn
puiksi.

Pian alettiin puhua että ruumis olikin kadonnut Skytteskäristä.


Hamberg ja Skoglannin Löf olivat käyneet asiaa peräämässä ja
tavanneet ainoastaan kuopan maassa. Joku arveli että pyssymiesten
juttu ruumiista oli ollut perätön, mutta Hamberg ja hänen kanssaan
monet puistivat päätään ja väittivät että nähtävästi se, jota asia
lähinnä koski, oli pitänyt varansa ja ennättänyt ennen muita. Jäljet
olivat kadonneet, mutta yhä yleisemmin alettiin Vennströmiä pitää
murhaajana. Tiedettiin että naapurukset olivat eläneet huonossa
sovussa.

Todistuksia ei ollut. Mutta minne Vennström tulikin, siellä puhuivat


ihmisten silmät mykkää kieltään. Ja hän ymmärsi. Hän ei kulkenut
enää kutomatalkoissa ja harvoin hänet nähtiin häissä tai
hautajaisissa. Hän pysyi ulkona saarellaan, oli mieluiten merellä tai
lintuluodoilla, kun joku poikkesi Aspöhön. Anna-Mari kertoi usein
tavanneensa hänet kävelemässä pitkin rantoja puhelemassa
itsekseen.

Niin kuluivat vuodet. Vennström kutistui kokoon pieneksi


ukonkäppyräksi, jolla oli omituinen tapa vilkaista syrjästä
puhuessaan ihmisten kanssa ja sitten taas katsoa poispäin.
Kalastajapaikkansa ja pelastuslippunsa oli hän luovuttanut toiselle
pojalleen. Hän kutoi verkkoja, kalasteli koukuilla ja eleli leskeksi
jäätyään pienessä mökissä Vähän-Aspön itälahdessa. Vennström oli
käynyt kuuroksi; jos hänelle puhui, vilkasi hän vain syrjästä ja näytti
välinpitämättömältä. Hamberg väitti kuitenkin että hän tekeytyi
kuurommaksi kuin oli. Ja ettei hän erehtynyt selveni Bergin Kallen
hautajaisissa.

Vennström oli nimittäin vastoin tapaansa saapunut niihin


hautajaisiin ja istui kamarissa missä vanhempi polvi joi puolikupposia
Kallen muistoksi. Siinä vainaata kaipaillessa mainittiin Elben
haaksirikko, josta Kallen keuhkotauti oli alkuisin ja Anselm Löfin
hämärä kohtalo. Nuoremmat kyselivät tarkemmin asiaa, vanhemmat
kertoivat puoliääneen, sillä Vennströmhän, joka istui nurkassa, oli
kuuro eikä siis tiennyt että hänestä puhuttiin. Äkkiä kuului parkaus:
»Niin, minä se tapoin Löfin!» Vennström seisoi keskellä lattiaa,
tuijottaen miehiä suoraan kasvoihin. Mutta kun hän aikoi jatkaa,
jäykistyi hän äkkiä ja alkoi vavista ja seuraavana hetkenä hän oli
kadonnut.

Ikkunasta nähtiin hänen hurjaa vauhtia soutavan Aspötä kohti.


Huoneeseen tuli hiljaisuus ja kuin salaisesta sopimuksesta alettiin
puhua muista asioista. Oli kuin ei kukaan olisi kuullut ukon
tunnustusta.

Mutta Vennström ei senjälkeen liikkunut mihinkään Aspöstä. Hän


ei puhutellut muita kuin omaisiaan. Jos vieras kohtasi hänet jäällä
koukkuja syöttämässä, vilkasi hän tätä nopeasti syrjästä ja katseli
sitten suurta ulappaa tahi Skytteskäriä sen laidassa.
*** END OF THE PROJECT GUTENBERG EBOOK
SAARISTOVÄKEÄ ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying copyright
royalties. Special rules, set forth in the General Terms of Use part of
this license, apply to copying and distributing Project Gutenberg™
electronic works to protect the PROJECT GUTENBERG™ concept
and trademark. Project Gutenberg is a registered trademark, and
may not be used if you charge for an eBook, except by following the
terms of the trademark license, including paying royalties for use of
the Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is very
easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund from
the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law in
the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms of
this agreement by keeping this work in the same format with its
attached full Project Gutenberg™ License when you share it without
charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears, or
with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning of
this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1 with
active links or immediate access to the full terms of the Project
Gutenberg™ License.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or expense
to the user, provide a copy, a means of exporting a copy, or a means
of obtaining a copy upon request, of the work in its original “Plain
Vanilla ASCII” or other form. Any alternate format must include the
full Project Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in paragraph
1.F.3, the Project Gutenberg Literary Archive Foundation, the owner
of the Project Gutenberg™ trademark, and any other party
distributing a Project Gutenberg™ electronic work under this
agreement, disclaim all liability to you for damages, costs and
expenses, including legal fees. YOU AGREE THAT YOU HAVE NO
REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF
WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE
FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving it,
you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or entity
that provided you with the defective work may elect to provide a
replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and distribution
of Project Gutenberg™ electronic works, harmless from all liability,
costs and expenses, including legal fees, that arise directly or
indirectly from any of the following which you do or cause to occur:
(a) distribution of this or any Project Gutenberg™ work, (b)
alteration, modification, or additions or deletions to any Project
Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.
Section 3. Information about the Project
Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many small
donations ($1 to $5,000) are particularly important to maintaining tax
exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.

Project Gutenberg™ eBooks are often created from several printed


editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.

You might also like