Tabnine Logo
LittleEndianDataInput.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.ardor3d.util.LittleEndianDataInput
constructor

Best Java code snippets using com.ardor3d.util.LittleEndianDataInput.<init> (Showing top 5 results out of 315)

origin: com.ardor3d/ardor3d-terrain

DataInput di = dis;
if (isLittleEndian) {
  di = new LittleEndianDataInput(dis);
origin: Renanse/Ardor3D

DataInput di = dis;
if (isLittleEndian) {
  di = new LittleEndianDataInput(dis);
origin: Renanse/Ardor3D

@Before
public void setup() throws Exception {
  in = new MockInputStream();
  array = new byte[10];
  littleEndien = new LittleEndianDataInput(in);
}
origin: Renanse/Ardor3D

public Image load(final InputStream is, final boolean flipVertically) throws IOException {
  final LittleEndianDataInput in = new LittleEndianDataInput(is);
  // Read and check magic word...
  final int dwMagic = in.readInt();
  if (dwMagic != getInt("DDS ")) {
    throw new Error("Not a dds file.");
  }
  logger.finest("Reading DDS file.");
  // Create our data store;
  final DdsImageInfo info = new DdsImageInfo();
  info.flipVertically = flipVertically;
  // Read standard dds header
  info.header = DdsHeader.read(in);
  // if applicable, read DX10 header
  info.headerDX10 = info.header.ddpf.dwFourCC == getInt("DX10") ? DdsHeaderDX10.read(in) : null;
  // Create our new image
  final Image image = new Image();
  image.setWidth(info.header.dwWidth);
  image.setHeight(info.header.dwHeight);
  // update depth based on flags / header
  updateDepth(image, info);
  // add our format and image data.
  populateImage(image, info, in);
  // return the loaded image
  return image;
}
origin: com.ardor3d/ardor3d-core

public Image load(final InputStream is, final boolean flipVertically) throws IOException {
  final LittleEndianDataInput in = new LittleEndianDataInput(is);
  // Read and check magic word...
  final int dwMagic = in.readInt();
  if (dwMagic != getInt("DDS ")) {
    throw new Error("Not a dds file.");
  }
  logger.finest("Reading DDS file.");
  // Create our data store;
  final DdsImageInfo info = new DdsImageInfo();
  info.flipVertically = flipVertically;
  // Read standard dds header
  info.header = DdsHeader.read(in);
  // if applicable, read DX10 header
  info.headerDX10 = info.header.ddpf.dwFourCC == getInt("DX10") ? DdsHeaderDX10.read(in) : null;
  // Create our new image
  final Image image = new Image();
  image.setWidth(info.header.dwWidth);
  image.setHeight(info.header.dwHeight);
  // update depth based on flags / header
  updateDepth(image, info);
  // add our format and image data.
  populateImage(image, info, in);
  // return the loaded image
  return image;
}
com.ardor3d.utilLittleEndianDataInput<init>

Javadoc

Creates a new LittleEndian reader from the given input stream. The stream is wrapped in a BufferedInputStream automatically.

Popular methods of LittleEndianDataInput

  • readFully
  • readInt
  • readLong
  • readUnsignedShort

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Collectors (java.util.stream)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now