membarrier - issue memory barriers on a set of threads
#include <linux/membarrier.h>
int membarrier(int cmd, int
flags);
The membarrier() system call helps reducing the overhead of the memory
barrier instructions required to order memory accesses on multi-core systems.
However, this system call is heavier than a memory barrier, so using it
effectively is not as simple as replacing memory barriers with this
system call, but requires understanding of the details below.
Use of memory barriers needs to be done taking into account that a
memory barrier always needs to be either matched with its memory barrier
counterparts, or that the architecture's memory model doesn't require the
matching barriers.
There are cases where one side of the matching barriers (which we
will refer to as "fast side") is executed much more often than the
other (which we will refer to as "slow side"). This is a prime
target for the use of membarrier(). The key idea is to replace, for
these matching barriers, the fast-side memory barriers by simple compiler
barriers, for example:
asm volatile ("" : : : "memory")
and replace the slow-side memory barriers by calls to
membarrier().
This will add overhead to the slow side, and remove overhead from
the fast side, thus resulting in an overall performance increase as long as
the slow side is infrequent enough that the overhead of the
membarrier() calls does not outweigh the performance gain on the fast
side.
The cmd argument is one of the following:
- MEMBARRIER_CMD_QUERY (since Linux 4.3)
- Query the set of supported commands. The return value of the call is a bit
mask of supported commands. MEMBARRIER_CMD_QUERY, which has the
value 0, is not itself included in this bit mask. This command is always
supported (on kernels where membarrier() is provided).
- MEMBARRIER_CMD_GLOBAL (since Linux 4.16)
- Ensure that all threads from all processes on the system pass through a
state where all memory accesses to user-space addresses match program
order between entry to and return from the membarrier() system
call. All threads on the system are targeted by this command.
- MEMBARRIER_CMD_GLOBAL_EXPEDITED (since Linux 4.16)
- Execute a memory barrier on all running threads of all processes that
previously registered with
MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED.
- Upon return from the system call, the calling thread has a guarantee that
all running threads have passed through a state where all memory accesses
to user-space addresses match program order between entry to and return
from the system call (non-running threads are de facto in such a state).
This guarantee is provided only for the threads of processes that
previously registered with
MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED.
- Given that registration is about the intent to receive the barriers, it is
valid to invoke MEMBARRIER_CMD_GLOBAL_EXPEDITED from a process that
has not employed MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED.
- The "expedited" commands complete faster than the non-expedited
ones; they never block, but have the downside of causing extra
overhead.
- MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED (since Linux 4.16)
- Register the process's intent to receive
MEMBARRIER_CMD_GLOBAL_EXPEDITED memory barriers.
- MEMBARRIER_CMD_PRIVATE_EXPEDITED (since Linux 4.14)
- Execute a memory barrier on each running thread belonging to the same
process as the calling thread.
- Upon return from the system call, the calling thread has a guarantee that
all its running thread siblings have passed through a state where all
memory accesses to user-space addresses match program order between entry
to and return from the system call (non-running threads are de facto in
such a state). This guarantee is provided only for threads in the same
process as the calling thread.
- The "expedited" commands complete faster than the non-expedited
ones; they never block, but have the downside of causing extra
overhead.
- A process must register its intent to use the private expedited command
prior to using it.
- MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED (since Linux 4.14)
- Register the process's intent to use
MEMBARRIER_CMD_PRIVATE_EXPEDITED.
- MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE (since Linux 4.16)
- In addition to providing the memory ordering guarantees described in
MEMBARRIER_CMD_PRIVATE_EXPEDITED, upon return from system call the
calling thread has a guarantee that all its running thread siblings have
executed a core serializing instruction. This guarantee is provided only
for threads in the same process as the calling thread.
- The "expedited" commands complete faster than the non-expedited
ones, they never block, but have the downside of causing extra
overhead.
- A process must register its intent to use the private expedited sync core
command prior to using it.
- MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE (since Linux
4.16)
- Register the process's intent to use
MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE.
- MEMBARRIER_CMD_SHARED (since Linux 4.3)
- This is an alias for MEMBARRIER_CMD_GLOBAL that exists for header
backward compatibility.
The flags argument is currently unused and must be
specified as 0.
All memory accesses performed in program order from each targeted
thread are guaranteed to be ordered with respect to membarrier().
If we use the semantic barrier() to represent a compiler
barrier forcing memory accesses to be performed in program order across the
barrier, and smp_mb() to represent explicit memory barriers forcing
full memory ordering across the barrier, we have the following ordering
table for each pairing of barrier(), membarrier() and
smp_mb().  On error, -1 is returned, and errno is set appropriately.
For a given command, with flags set to 0, this system call
is guaranteed to always return the same value until reboot. Further calls
with the same arguments will lead to the same result. Therefore, with
flags set to 0, error handling is required only for the first call to
membarrier().
- EINVAL
- cmd is invalid, or flags is nonzero, or the
MEMBARRIER_CMD_GLOBAL command is disabled because the
nohz_full CPU parameter has been set, or the
MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE and
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE commands are
not implemented by the architecture.
- ENOSYS
- The membarrier() system call is not implemented by this
kernel.
- EPERM
- The current process was not registered prior to using private expedited
commands.
The membarrier() system call was added in Linux 4.3.
membarrier() is Linux-specific.
A memory barrier instruction is part of the instruction set of architectures
with weakly-ordered memory models. It orders memory accesses prior to the
barrier and after the barrier with respect to matching barriers on other
cores. For instance, a load fence can order loads prior to and following that
fence with respect to stores ordered by store fences.
Program order is the order in which instructions are ordered in
the program assembly code.
Examples where membarrier() can be useful include
implementations of Read-Copy-Update libraries and garbage collectors.
Assuming a multithreaded application where "fast_path()" is executed
very frequently, and where "slow_path()" is executed infrequently,
the following code (x86) can be transformed using membarrier():
#include <stdlib.h>
static volatile int a, b;
static void
fast_path(int *read_b)
{
a = 1;
asm volatile ("mfence" : : : "memory");
*read_b = b;
}
static void
slow_path(int *read_a)
{
b = 1;
asm volatile ("mfence" : : : "memory");
*read_a = a;
}
int
main(int argc, char **argv)
{
int read_a, read_b;
/*
* Real applications would call fast_path() and slow_path()
* from different threads. Call those from main() to keep
* this example short.
*/
slow_path(&read_a);
fast_path(&read_b);
/*
* read_b == 0 implies read_a == 1 and
* read_a == 0 implies read_b == 1.
*/
if (read_b == 0 && read_a == 0)
abort();
exit(EXIT_SUCCESS);
}
The code above transformed to use membarrier() becomes:
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <linux/membarrier.h>
static volatile int a, b;
static int
membarrier(int cmd, int flags)
{
return syscall(__NR_membarrier, cmd, flags);
}
static int
init_membarrier(void)
{
int ret;
/* Check that membarrier() is supported. */
ret = membarrier(MEMBARRIER_CMD_QUERY, 0);
if (ret < 0) {
perror("membarrier");
return -1;
}
if (!(ret & MEMBARRIER_CMD_GLOBAL)) {
fprintf(stderr,
"membarrier does not support MEMBARRIER_CMD_GLOBAL\n");
return -1;
}
return 0;
}
static void
fast_path(int *read_b)
{
a = 1;
asm volatile ("" : : : "memory");
*read_b = b;
}
static void
slow_path(int *read_a)
{
b = 1;
membarrier(MEMBARRIER_CMD_GLOBAL, 0);
*read_a = a;
}
int
main(int argc, char **argv)
{
int read_a, read_b;
if (init_membarrier())
exit(EXIT_FAILURE);
/*
* Real applications would call fast_path() and slow_path()
* from different threads. Call those from main() to keep
* this example short.
*/
slow_path(&read_a);
fast_path(&read_b);
/*
* read_b == 0 implies read_a == 1 and
* read_a == 0 implies read_b == 1.
*/
if (read_b == 0 && read_a == 0)
abort();
exit(EXIT_SUCCESS);
}
This page is part of release 5.05 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the latest
version of this page, can be found at https://www.kernel.org/doc/man-pages/.


Along comes another adaptation of a great, Henry James novel, the second this fall, and as is the case of Washington Square which preceded it, we could endlessly debate the virtues of the movie, compared to those of the book. One might as well compare a photograph of Pablo Picasso, to a Picasso painting. Aside from the fact that both bear some relationship to the artist, there's not much more than the name, Picasso, to connect the photograph and the painting. The same applies to The Wings of the Dove. Don't expect a movie like this one to equate with the book. The Wings of the Dove is one of the greatest novels of a writer whom many believe is one of the very best American writers, perhaps the best novelist this country has ever produced. In his writings Henry James explored such issues as the conflict between cultures European and American, but as much as anything else his novels are about character. And his nuanced descriptions of character, together with the dialogue and narrative out of which his stories are built, constitute the essence of his work. His novels exist in the form of text; yet in the reading of the text pictures emerge, and are seen against the screen of the imagination which one brings to the reading.
With movies things are very, very different. The pictures predominate. The director (Iain Softley) and the cinematographer (Eduardo Serra) provide the visual images out of which flow a sense of place and story. And it's up to the actors by the tone and tenor of their voices, body language, and other visual cues, as much as through lines of dialogue, to suggest what is happening within. All of this is supported, especially in period movies like this one by costumes and sets that convey mood as well as a sense of time and place. This film is highly visual....from the lively street scenes of turn-of the-century London to the luscious interiors of English town houses and Italian canal houses and churches. Of course, visual images can have symbolic depth and power, just as words do, but they function on a different wave length altogether. For example, in one transition, a rather scary looking medical instrument in an operating room dissolves into a soccer ball that seems to descend from the heavens into the midst of a soccer game. In another scene the central characters, riding in gondolas illuminated by the warm light of oil lanterns, drift off into the distance, and into the darkness of a Venice canal. And in visual gestures such as these, the contrast between life and death, light and darkness reinforce what is happening within the lives of the novel's central characters.
Against this visually rich backdrop, the novel's three central characters play their parts: Kate Croy (Helena Bohnam Carter), the protagonist, who is torn between love of journalist Merton Densher (Linus Roache) and her need for social and financial security; the young, zestful and idealistic American heiress, Millie Theale (Alison Elliott) who is fighting for life in the midst of death. These three form a classic triangle, a configuration of love and hate, commitment and betrayal, friendship and deceit in which we see all that is both virtuous and sordid in human relationships combine and collide. In this complicated and perplexing set of relationships there is some evidence of what made Henry James a great novelist. James had a profound sensitivity for the moral complexity of human relationships; he understood that one cannot divide the human family neatly into tribes, with villains on the one side and heroes on the other. He knew that both good and evil can and do reside within a single life, and that for us all life is a struggle of life against death and darkness against the light.
I would recommend this movie for three reasons. First, the scenes of London and Venice are quite well done. You'll want to visit Venice soon after seeing this movie. Second, the actors all do a very credible job, with only a modest quantity of dialogue, suggesting and evoking some of the more complicated themes of the novel. And finally, this movie will give you a number of reasons to ponder your own motives and examine your own relationships with what may be an embarrassing recognition of how closely the desire for friendship and love can be related to the need for power. Four flames.
Charles Henderson
For additional reviews visit our website at http://christianity.miningco.com/library/weekly/blmovies.htm
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


An easy to access resource center for everything related to The System.
Upload past traits. Vote the best to the top!
Access your character anytime, anywhere.


Refresh of our Windows desktop tax preparation software for Windows 7. This included an overall visual and experience refresh, redesign of global navigation elements, and designing the Windows debut of 'Flags'.
Customer first. Our Windows customers have been with us for 10 years on average. They're fiercely loyal, intimately familiar with how the product works, and emphatically don't want 'change'. So, when we rewrote the interface in Windows Presentation Foundation (WPF) for Windows 7, we were careful and considerate.
Focus on refinement. We untangled clumsy task flows, made under-utilized features like 'Ask a Tax Expert' more accessible, and polished the look and feel to a high sheen. We also leveraged the new animation capabilities of WPF to add context to important events in tax preparation, like file transfer and calculations.
Very usable. The side bar collects several forms of user assistance. Even though we more than doubled the feature set, our analytics proved we made them all more accessible and widely used than before.
Native look and feel. We used native Windows 7 widgets and design patterns, so it was immediately obvious and intuitive to use.
New 'Flags'. The new Flags feature allows a customer to bookmark specific areas to return to later. It exceeded projections for adoption rate and net promoter score.
Improved 'Ask a Tax Expert'. A customer can connect directly to an expert to answer complicated questions. This feature saw a 280% increase in year-over-year revenue.
Massive improvement. This was a combined effort across multiple teams on the Windows platform, and included a transition to a WPF forms codebase, code refactoring, and increased stability. We finished it off with a fresh, clean look and feel.


LIGHT PAY (LPC)
Light Pay Coin
Total:5
LPC STATS
-
Daily Income
$0.777
0.000035 BTC
2.34565 LPC
-
Weekly Income
$0.777
0.000035 BTC
2.34565 LPC
-
Monthly Income
$0.777
0.000035 BTC
2.34565 LPC
-
Yearly Income
$0.777
0.000035 BTC
2.34565 LPC
- Price: $0.241440
- Volume: $0.241440
- Marketcap: $0.241440
- Change: $0.241440
- Rio (annual): $0.241440
- Active Masternodes: $0.241440
- Required Coins for Masternodes: $0.241440
- Masternodes worth: $0.241440


[1]
Fast and maintain a medium that is nice idea for mac..
[2]
great combo wireless internet and maintain a medium that is nice idea for mac..


I'm a stubborn problem solver who strives to use my powers for good. As a coder, DJ, and musician, I believe that creating things, both useful and artful, is the driving force of humanity. I currently live and work in Austin, TX.
Contact Me
Bloccit
A Reddit clone that serves as my first Ruby on Rails project created alongside my mentor at bloc.io using various pair programming techniques and a Rails fundamentals curriculum.
I developed this project with Test Driven Development using RSpec. Alongside learning to implement different polymorphic Active Record Associations and standard Rails techniques, I also learned to write an user authentication module from scratch and created a simple, RESTful JSON API for the project.
Technologies:
Ruby on Rails, RSpec, TDD, JSON, RESTful API, Bootstrap
An online music player built to learn the fundamentals of front-end development. BlocJams is a Single Page Application that was originally written as a static site using vanilla JavaScript. It was then refactored to leverage jQuery, then refactored again using the client-side framework Angular.js.
Taut is a Slack replica developed using Angular.js with three-way data binding to Firebase. Firebase is a great server-side database alternative provided for SPAs by Google. It allows your site to run client-side while providing a secure database for memory persistence. Angular hook ins were provided by Angular Fire.
Wikibloc is a Ruby on Rails app that allows users to create and share wikis in public environment, as well as create private documents via a premium membership.
The main challenge with this project involved user management, permissions, and scoping the correct wikis to users depending on their status as owner, premium user, or collaborator. For this I integrated three third-party APIs - Devise, Rolify, and Pundit - to implement these features.
The second challenge involved charging customers to become premium user. To solve this, I decided to use the Stripe gem and API. Stipe's API made integrating a charging portal simple and safe, and their documentation is thorough and easy to access.
For the main index page, I decided to implement my first search and filter function to make the index of public wikis a little less unwieldy for users. I set up a simple Postgres query to allow the user to further filter their scoped wikis by searching for a desired keyword or topic. The search is case agnostic and searches both the title and the body for the given words or phrases.
If-Me.org is a site that strives to encourage better mental health through communication with your support system - family, friends, etc. As an open-source contributor to this site, I have provided Javascript refactoring and have worked on other issues tracked via github.


Mobile Application developer from Dhaka, Bangladesh. Passionate about Information Technology. I love practical and beautiful design, clean code and happy users. I have been enjoying responsibilities of developing complex and rich application based on computer technology. I believe in providing the best solution and effective suggestions to my clients that exactly fit to their requirements and help them in achieving their business goals.
Appcelerator (Titanium SDK), Java, Android SDK, Android Libraries(Retrofit, Gson, ButterKnife), SQL, Git, OOP, Databases, Design Patterns, Cloud Mobile Computing, ArrowDB and Proxycodeing
Front-end web development


A free-to-attend tech unconference in the city of Canterbury
The UK is currently in lockdown because of Covid-19; but we can still collaborate/share our projects/ideas using modern browser based streaming tools
BarCamp's are traditionally free-to-attend tech unconference where the attendees give talks about their projects/experiences
We invite anyone from our Canterbury community (or further afield) to join us on our live-stream and talk about cool tech/science stuff
We will broadcast over FacebookLive and YoutubeLive
Speakers/Presenters will be able to join our online broadcast studio on StreamYard
Signup below to give a talk!
Saturday 9th May 2020
The virtual event will be a bit more freeform than a traditional timetable
Talks could range from 5min to 30min
Speakers can easily join the studio via a modern web-browser with a webcam and share a second display/desktop.
We can take live questions/comments from facebook and youtube to help the stream have a live community feel
This is just a small experiment to keep our community interacting during these difficult times
If we could get between 5 to 10 people watching the live talks that would be a good event
For now, we just want to see if an event like this could work
This virtual event could help us test the technology to see if live streaming our upcoming physical events could be possible
BarCamp Canterbury is a free-to-attend unconference.
The content of BarCamp Canterbury is provided by the attendees.
Based in the historic city of Canterbury in the heart of Kent.
The venue has been generously donated by the University of Kent: School of Computing
Possibly November 2020.
BarCamp Canterbury is an unconference that is completely free-to-attend and based loosely around the theme of technology.
As an unconference, the content of BarCamp Canterbury is provided by you, the attendees! Meet with like-minded people, share your ideas and engage in discussions.

Previous events which welcomed over 150 delegates from all around the UK (and further afield).
See snippets from previous events:
So you have decided that BarCamp sounds awesome, and you want to attend? Check out this check list of things you should do.
On the day we will share a link to the session grid. If you'd like to give a talk, you simply add the details of the talk to the grid. It's as easy as that!
Need ideas for the topic of your talk?
Talks can be about just about anything. Although talks tend to be tech-related, there's no strict requirement for them to be. Attendees don't have to give a talk, although we do encourage everyone to get involved in some way.
Talk slots are 30mins
All eventrooms will have whiteboards and projectors with VGA or HDMI connectivity
Are you ... a wizard? 🧙
Last year we had talks about home automation, car meachanice, automating stage lighting, building digital badges, science of creating vegan cheese, biohacking, and more ...
Our theme was loosely based on 'The Fifth Element' with digital interactive badges and intriguing team based puzzles
Do you have any unloved/unwanted gadgets, cables, tools, boards, tech, bits, stuff?
Donate any working bits that someone else could use in an upcoming projects.

After the main event there will be a social gathering nearby. More details will be announced closer to the date.
Thanks to our generous sponsors and supporters, lunch and snacks will be provided!
(As this is a free event we may not be able to provide food for all dietary requirements)
If you would like to sponsor BarCamp Canterbury, please read the additional sponsorship details and email us.
Parking on camps can be free at weekends. Carpark 9 is the closest to Woolf College
We would like to thank our supporters who have helped to make BarCamp Possible.
BarCamp supporters have contributed time, money or wares to help support this event.


|
JTS Topology Suite version 1.13 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vividsolutions.jts.io.WKBWriter
public class WKBWriter
Writes a Geometry
into Well-Known Binary format.
Supports use of an OutStream
, which allows easy use
with arbitary byte stream sinks.
The WKB format is specified in the OGC Simple Features for SQL specification. This implementation also supports the Extended WKB standard. Extended WKB allows writing 3-dimensional coordinates and including the geometry SRID value. The presence of 3D coordinates is signified by setting the high bit of the wkbType word. The presence of an SRID is signified by setting the third bit of the wkbType word. EWKB format is upward compatible with the original SFS WKB format.
Empty Points cannot be represented in WKB; an
IllegalArgumentException
will be thrown if one is
written.
The WKB specification does not support representing LinearRing
s;
they will be written as LineString
s.
This class is designed to support reuse of a single instance to read multiple geometries. This class is not thread-safe; each thread should create its own instance.
The specification uses a syntax language similar to that used in the C language. Bitfields are specified from hi-order to lo-order bits.
byte = 1 byte uint32 = 32 bit unsigned integer (4 bytes) double = double precision number (8 bytes) abstract Point { } Point2D extends Point { double x; double y; } Point3D extends Point { double x; double y; double z; } LinearRing { uint32 numPoints; Point points[numPoints]; } enum wkbGeometryType { wkbPoint = 1, wkbLineString = 2, wkbPolygon = 3, wkbMultiPoint = 4, wkbMultiLineString = 5, wkbMultiPolygon = 6, wkbGeometryCollection = 7 } enum byteOrder { wkbXDR = 0, // Big Endian wkbNDR = 1 // Little Endian } WKBType { uint32 wkbGeometryType : 8; // values from enum wkbGeometryType } EWKBType { uint32 is3D : 1; // 0 = 2D, 1 = 3D uint32 noData1 : 1; uint32 hasSRID : 1; // 0, no, 1 = yes uint32 noData2 : 21; uint32 wkbGeometryType : 8; // values from enum wkbGeometryType } abstract WKBGeometry { byte byteOrder; // values from enum byteOrder EWKBType wkbType [ uint32 srid; ] // only if hasSRID = yes } WKBPoint extends WKBGeometry { Point point; } WKBLineString extends WKBGeometry { uint32 numCoords; Point points[numCoords]; } WKBPolygon extends WKBGeometry { uint32 numRings; LinearRing rings[numRings]; } WKBMultiPoint extends WKBGeometry { uint32 numElems; WKBPoint elems[numElems]; } WKBMultiLineString extends WKBGeometry { uint32 numElems; WKBLineString elems[numElems]; } wkbMultiPolygon extends WKBGeometry { uint32 numElems; WKBPolygon elems[numElems]; } WKBGeometryCollection extends WKBGeometry { uint32 numElems; WKBGeometry elems[numElems]; }
WKBReader
| Constructor Summary | |
|---|---|
WKBWriter()
Creates a writer that writes Geometry s with
output dimension = 2 and BIG_ENDIAN byte order |
|
WKBWriter(int outputDimension)
Creates a writer that writes Geometry s with
the given dimension (2 or 3) for output coordinates
and ByteOrderValues.BIG_ENDIAN byte order. |
|
WKBWriter(int outputDimension,
boolean includeSRID)
Creates a writer that writes Geometry s with
the given dimension (2 or 3) for output coordinates
and ByteOrderValues.BIG_ENDIAN byte order. |
|
WKBWriter(int outputDimension,
int byteOrder)
Creates a writer that writes Geometry s with
the given dimension (2 or 3) for output coordinates
and byte order
If the input geometry has a small coordinate dimension,
coordinates will be padded with Coordinate.NULL_ORDINATE . |
|
WKBWriter(int outputDimension,
int byteOrder,
boolean includeSRID)
Creates a writer that writes Geometry s with
the given dimension (2 or 3) for output coordinates
and byte order. |
| Method Summary | |
|---|---|
static java.lang.String |
bytesToHex(byte[] bytes)
Deprecated. |
static java.lang.String |
toHex(byte[] bytes)
Converts a byte array to a hexadecimal string. |
byte[] |
write(Geometry geom)
Writes a Geometry into a byte array. |
void |
write(Geometry geom,
OutStream os)
Writes a Geometry to an OutStream . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WKBWriter()
Geometry
s with
output dimension = 2 and BIG_ENDIAN byte order
public WKBWriter(int outputDimension)
Geometry
s with
the given dimension (2 or 3) for output coordinates
and ByteOrderValues.BIG_ENDIAN
byte order.
If the input geometry has a small coordinate dimension,
coordinates will be padded with Coordinate.NULL_ORDINATE
.
outputDimension
- the coordinate dimension to output (2 or 3)public WKBWriter(int outputDimension, boolean includeSRID)
Geometry
s with
the given dimension (2 or 3) for output coordinates
and ByteOrderValues.BIG_ENDIAN
byte order. This constructor also
takes a flag to control whether srid information will be
written.
If the input geometry has a smaller coordinate dimension,
coordinates will be padded with Coordinate.NULL_ORDINATE
.
outputDimension
- the coordinate dimension to output (2 or 3)includeSRID
- indicates whether SRID should be writtenpublic WKBWriter(int outputDimension, int byteOrder)
Geometry
s with
the given dimension (2 or 3) for output coordinates
and byte order
If the input geometry has a small coordinate dimension,
coordinates will be padded with Coordinate.NULL_ORDINATE
.
outputDimension
- the coordinate dimension to output (2 or 3)byteOrder
- the byte ordering to usepublic WKBWriter(int outputDimension, int byteOrder, boolean includeSRID)
Geometry
s with
the given dimension (2 or 3) for output coordinates
and byte order. This constructor also takes a flag to
control whether srid information will be written.
If the input geometry has a small coordinate dimension,
coordinates will be padded with Coordinate.NULL_ORDINATE
.
outputDimension
- the coordinate dimension to output (2 or 3)byteOrder
- the byte ordering to useincludeSRID
- indicates whether SRID should be written| Method Detail |
|---|
public static java.lang.String bytesToHex(byte[] bytes)
bytes
-
public static java.lang.String toHex(byte[] bytes)
bytes
- a byte array
public byte[] write(Geometry geom)
Geometry
into a byte array.
geom
- the geometry to write
public void write(Geometry geom, OutStream os) throws java.io.IOException
Geometry
to an OutStream
.
geom
- the geometry to writeos
- the out stream to write to
java.io.IOException
- if an I/O error occurs
|
JTS Topology Suite version 1.13 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |